Suppose I quit an app, say Amazon. How can I fire up an intent or view right after it closes? I also want the app name or package Name which was closed..
For example, the way truecaller does it. It opens a view right after you call someone..
Suppose I quit an app, say Amazon. How can I fire up an intent or view right after it closes? I also want the app name or package Name which was closed..
For example, the way truecaller does it. It opens a view right after you call someone..
There is no possibility to do that - it is rather insecure from users perspective.
TrueCaller is listening on PHONE_STATE event.
If you want to implement this, You need to get a list of all installed apps and check if each app is running or not and then do your logic. And you can't compare your state with a truecaller. Cause truecaller is using a broadcast receiver which is an Android component which allows you to register for system or application events.
And to fully understand the ability to know when an app shuts down check this answer