Reputation: 789
We use heads up notification together with fullscreen intent to show important update to end user when he receives push message from server. This immersive behavior is intentional.
The activity triggered by the fullscreen intent also turns the device ON and gets displayed over the lockscreen. The application behavior is correct in almost all scenarios:
- When device is locked and screen is off the intent launches the activity and turns the screen on. User immediately sees our activity.
- When device is unlocked and user is working with the device, heads up notification is displayed and by clicking on it we start our activity.
But when the device is on, user gets the heads up notification and decides to turn the screen off, the fullscreen intent is immediately triggered too, turning the screen back on and showing our activity. Which is not a desired behavior. I would expect the device to just turn the screen off and let the notification fall back among other notifications.
We can't figure out how to prevent the fullscreen intent to be triggered when user decides to ignore the heads up notification and turn the screen off. Any suggestions or experience?
Upvotes: 1
Views: 1699
Reputation: 789
After some testing it turned out this behavior is intended and all applications that are using heads-up notifications with fullscreen intent are behaving the same. Tested on Phone and Messenger app.
Upvotes: 2