Hey, I've been working on app that's similar to a lock screen and have to detect when the phone is unlocked and launch my MainActivity. After seeing on many such forums(SO mainly) I managed to achieve my goal and fire up the activity using the ACTION_USER_PRESENT intent receiver in the Manifest file ,as suggested by many SO users. However, sometimes the Activity gets called only a few seconds after the phone is unlocked(power button pressed). Is there any work around to invoke the activity AS SOON AS the phone is unlocked? Also, I read in few places that declaring ACTION_USER_PRESENT in the manifest does not work always. I could not manage to make the registerReceiver() work. Which method is best?
Any help is appreciated.
- Sriram
Any help is appreciated.
- Sriram