How to start an Activity or Service before an App application is uninstalled by the User?

前端 未结 4 1118
不知归路
不知归路 2020-12-03 17:31

Why the same question again

This question has been asked around 100 times on SO. I am asking it again because all the answers say thi

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 17:46

    I don't know how it happen in NQ Mobile Security application,

    But in general case I found it not possible (Or may be possible but I couldn't find the way),

    Because,

    When you register BroadcastReceiver for android.intent.action.PACKAGE_REMOVED in your own app and when the app is uninstalled, the registered BroadcastReceiver has been uninstalled before the app gets uninstalled,so its own uninstallation event won't be received by that BroadcastReceiver.

提交回复
热议问题