Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 device goes to lock screen after quit app when showing splashscreen #1513

Open
3 tasks done
TruyenNV opened this issue Oct 27, 2022 · 3 comments
Open
3 tasks done
Labels
info-needed / awaiting response Further information is requested

Comments

@TruyenNV
Copy link

TruyenNV commented Oct 27, 2022

Bug Report

Problem

What is expected to happen?

Doesn't lock screen

What does actually happen?

Goes to lock screen when quit app at splashscreen

Information

Only happen with Cordova-Android@11 and Android 13 device

Command or Code

Environment, Platform, Device

Cordova-Android@11 and Android 13 device

Version information

My Ionic info:

Ionic:

Ionic CLI : 6.20.3 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.9
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 11.0.0
Cordova Platforms : android 11.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

cordova-res : 0.15.4
native-run : 1.7.1

System:

Android SDK Tools : 26.1.1 (/Users/truyenn/Library/Android/sdk/)
ios-deploy : 1.9.4
ios-sim : 8.0.0
NodeJS : v14.20.1 (/usr/local/bin/node)
npm : 6.14.17
OS : macOS Monterey
Xcode : Xcode 13.4.1 Build version 13F100

cordova plugin ls
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@terreng
Copy link

terreng commented Nov 4, 2022

This is an Android 12/13 bug specific to Pixel phones. It should be fixed in the latest/upcoming Android 13 release. Here's the bug report in the issue tracker: https://issuetracker.google.com/issues/242118185

A workaround is suggested for affected Android versions:

If the developer seeing this on eailer android verion(13-), the workaround might try to defer the finish call after activity resumed if that activity has register #setOnExitAnimationListener, or call #clearOnExitAnimationListener before finish and onResume.

I believe the Pixel 3 hasn't gotten any updates past Android 12, so it would be a good idea to implement this workaround to avoid the issue.

To reproduce this issue, simply close the app immediately after opening it, while it's still on the SplashScreen. This will crash System UI and kick you back to the lock screen. Only happens on Pixel devices running Android 12/13.

@breautek breautek added this to the 11.0.1 milestone Nov 29, 2022
@breautek breautek modified the milestones: 11.0.1, 12.0.0 Mar 20, 2023
@breautek
Copy link
Contributor

Moving this from the 11.0.1 milestone to 12.0.0 milestone because master already has the major version bump.

@breautek
Copy link
Contributor

breautek commented Apr 10, 2023

The link issue states the issue has been fixed upstream in the "android framework" however it's unclear where that fix is landed or what package really needs to be updated.

However, current master is using v1.0.0 (upgraded from v1.0.0 release candidate), so maybe it's worth testing again against a development version of the platform to see if the issue persists.

@breautek breautek added the info-needed / awaiting response Further information is requested label Apr 24, 2023
@breautek breautek removed this from the 12.0.0 milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed / awaiting response Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants