Android Question SetShowWhenLocked ... again

Sgardy

Member
Licensed User
Longtime User
I built an application that need to show an activity at a specific time even if the phone is sleeping. It worked fine with my last phone Galaxy J5 Android 9 but not now with the new A51.
Something goes better if I change the sdk target to 26 instead of 28, but it works if the phone is just gone in standby and not when in deep sleep.
I schedule a service that run properly, this service put the phonewakestate to KeepAlive and then starts an activity with the known SetShowWhenLocked routine but now the activity doesn't starts.
I'm getting mad! Does anyone have a solution?

Thanks.
 

JohnC

Expert
Licensed User
Longtime User
Just the make sure we are on the same page...

Does the service start OK at the specified time, but it's the activity that doesn't show?

Or is it that the "service" does not start at the specified time?
 
Upvote 0

Sgardy

Member
Licensed User
Longtime User
The service starts but the problems are two, the service should play a sound and start an activity. It was ok in older version of android but now it doesn't play the sound an doesn't start the activity.
 
Upvote 0
Top