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

Oppening the app when user locked screen #1

Closed
alirezat66 opened this issue Jun 28, 2022 · 1 comment
Closed

Oppening the app when user locked screen #1

alirezat66 opened this issue Jun 28, 2022 · 1 comment

Comments

@alirezat66
Copy link

Hi, I see that some applications need to open the app even when the app is locked. For example, Whatsapp when getting a call open the call screen even if it was locked.
When I developed as an android developer I do something like that and open a specific screen. it needs the Administration's permission. is it possible that add open app() method to your plugin?

@X-SLAYER
Copy link
Owner

What you are looking for is called a time sensitive notification with a full screen notification. What it does is that if the screen is locked it opens the activity linked to the pending intent used for full screen notification. When the phone is unlocked, it shows a heads up notification instead. You must have seen this behavior with all kinds of telephony apps and alarm apps.

A flutter app runs inside a single activity, so if you mark that as the activity to show during the locked state, the app will show. But it will act similar to how the app would when you launch it from start. Also the behavior is unpredictable as it is behind a wakelock. So a better option would be to move it to a separate activity and do the needful. Example of how to implement full screen notifications.

https://medium.com/android-news/full-screen-intent-notifications-android-85ea2f5b5dc1

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

2 participants