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

Resume App #1

Open
pmagnuson opened this issue Apr 23, 2024 · 1 comment
Open

Resume App #1

pmagnuson opened this issue Apr 23, 2024 · 1 comment

Comments

@pmagnuson
Copy link

I've been using is_lock_screen and recently starting having different behavior. After switching to is_lock_screen2, I recorded this log.

I am using this code block to detect if the lock button has been used

 @override
  void didChangeAppLifecycleState(AppLifecycleState state) async {
    log.finer(
        'state $state lockScreen: ${await isLockScreen()} inLocalMode $inLocalMode');

    super.didChangeAppLifecycleState(state);
  }

The log below captures a screen timeout - without using the physical lock button.

log for going to background

[log] 10:27:16.224: TabProvider: state AppLifecycleState.inactive lockScreen: false inLocalMode true
[log] 10:27:16.923: TabProvider: state AppLifecycleState.hidden lockScreen: false inLocalMode true
[log] 10:27:16.934: TabProvider: state AppLifecycleState.paused lockScreen: false inLocalMode true

when the screen is touched, the following states occur

[log] 10:37:03.557: TabProvider: state AppLifecycleState.hidden lockScreen: true inLocalMode false
[log] 10:37:03.564: TabProvider: state AppLifecycleState.inactive lockScreen: true inLocalMode false
[log] 10:37:04.924: TabProvider: state AppLifecycleState.hidden lockScreen: true inLocalMode false
[log] 10:37:04.938: TabProvider: state AppLifecycleState.paused lockScreen: true inLocalMode false

With state=inactive and isLockScreen=true, this seems like an error.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.9, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.85.0)

This was run on a Pixel 8 with Android 14

@pmagnuson
Copy link
Author

results are similar on iPhone 12 running iOS 17.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant