开发者

Uninstalling APK : one last action before uninstall

I'm developing an application for Android that installs stuff on the phone's sim card. What I wan't is for the application to do one last action upon uninstall : remove开发者_C百科 what's inside the sim card. Which means : I need to do one last action when my APK is uninstalled.

Problem : I didn't find any way to do so. (Apart from having a secondary application, that catches the uninstall intent, and does the job, but that's very faaaaar from what I wan't I'm afraid)

If anyone has a solution, I'm really interested.

Thanks in advance.

(PS : I'm kind of afraid that there is none, actually)


You are correct. There is no such event, and there is no supported way to get notified when your application is being uninstalled. Application's process is simply killed (if it was running) and application is uninstalled.


If you can detect if other applications are uninstalled via ACTION_PACKAGE_REMOVED, wouldn't is be possible to solve the problem if you made 2 applications? The second being a broadcastreceiver that catches the intent and then deletes content.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜