Android Question Detect mobile on / off

strupp01

Active Member
Licensed User
Longtime User
Hello experts,
I'm looking for a way to determine if a cell phone is on (screen is on) or off (screen is off). I searched the forum, but found no solution.
Does anyone know of a way and can help?
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
Not an expert but take a look at PhoneEvents from the Phone library. Running a background service you'll receive the screen's event.
Hope this can help
 
Upvote 0
Top