以下是方案: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?
基于3年前我读过的here,你不能在Android中做到这一点,但我不确定这次是否已经可以实现?
但无论如何,我正在考虑使用BroadcastReceiver
,但需要另外一个应用程序来监听我的主应用程序的卸载事件。
如果有人想到的话,我已经没有想法了。我将不胜感激。
非常感谢。