Android Question foreground services

cengolo

Member
Licensed User
Longtime User
i have an application with alarm inside, uses services.startforeground to play the next alarm even if the main activity is killed or paused. all works fine, as long as i don't make the phone sleep by pressing the button.

what should i do to let my service

1. wake the phone screen (if it's sleeping) at specific time
2. bring the main activity foreground
3. play the alarm audio file

your help will be appreciated.
 

Peter Simpson

Expert
Licensed User
Longtime User
Upvote 0
Top