Here's the scenario: Provided the servers and api are already there, so my device is already registered with my account. I want it to call the API unregister() if the app has been uninstalled. The same with Facebook app, if a user is currently logged in then the FB app has been uninstalled, the next time it is installed and run, you will be redirected to the login page and not the timeline. How do they do this? How do I listen the event of my app being uninstalled or freshly installed?
Basing from what I've read here which was 3 years ago, you cannot do that in Android but I'm not sure if it is already possible by this time?
But anyway, I was thinking of using BroadcastReceiver
but would require to have another app to listen the uninstallation event of my main app.
I've ran out of ideas, if anyone has something in mind. I will be greatly appreciated.
Thanks ahead.