I created a sample application. In my application I have 4 Activity
s and 1 BroadCastReciever
that runs in background. Here I wrote there service for the purpose of when the user Unlock the screen, I run my application. Everything works fine except this:
When I run my application, I'm in my third activity. The user no longer interacts with screen so the device gets auto screen locked. Now I unlock the screen means, the application runs from the first activity. I need to run the application from the user's last interacted activity (for example, if the user interacted with the third activity, I need to show the third activity when the screen unlocks).