Android Question startactivity and locked phone

cengolo

Member
Licensed User
Longtime User
Hi, I am developing an application which has an internal alarm system. if the Phone is on (no matter the program is in the background) alarm plays fine, but if user locks the phone with the button (screen is also closed), the startactivity does not fire up, it does not play the alarm sound. however, if i press the button and wake the phone, alarm plays.

how can i play the alarm (and open the screen and bring my app to foreground) even if the phone is sleeping by using startactivity?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…