android - Detecting reason for the screen turning ON -


what have far service registered broadcastreceiver following actions: action_screen_on/action_screen_off.

so far good. if screen goes on or off notification. happens various reasons: user pushes button (power, home, etc), battery gets charged, incoming call, etc.

what need detect reason turning screen on. , more precisely detect if because of user pushing power or home button. i've read opinions there no reliable way this, ask again before giving up.

thanks in advance!


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -