Android Question Notification

Stiffy

Member
I got recommended to use the Alarm Manager to show up a notification in the future date. Is it right now because the service to generate notification will be killed when the user closes the app. All of the examples about setting notification (birthday for example) do not work now on android 10. What is the correct way to do it now (just show a right method, I do not need code.
 

Stiffy

Member
A
AlarmManager = StartServiceAt or StartServiceAtExact
Alarm Manager will be killed if the device is booted. So far, I use Alarm Manager with a foreground service to generate an alarm for the far future. But in android 10 foreground service is killed so I can not schedule an alarm activity.
 
Upvote 0

Stiffy

Member
I try BroadcastReceiver to start my foregound service but it doesn't work in android 9/10 although it does well in android 7.!!!
 
Upvote 0

Stiffy

Member
Broadcast Receiver after boot can not start foreground service although it is easily done in MainActivity. What method for starting foreground service from Broadcast Receiver, esp. in android 10? I checked many topics and see there is no answer about this.
 
Upvote 0
Top