可以code,当我的Andr​​oid应用程序卸载被称为?

问题描述:

有谁知道,如果一个特定的方法是可用的,当我卸载应用程序被重写?这将是很好,从服务器端数据库中删除这些用户,当出现这种情况。

Does anyone know if a specific method is available to be overridden when my application is uninstalled? It would be nice to remove these users from the server side database when this occurs.

不幸的是,目前还没有办法对Android包执行code它被删除时。但是,你可以注册一个BroadcastReceiver$c$c>为ACTION_PACKAGE_REMOVED$c$c> 在不同的包的包时,从手机中取出,将被调用。

Unfortunately there is currently no way for an Android package to execute code when it is removed. However, you can register a BroadcastReceiver for ACTION_PACKAGE_REMOVED in a different package that will be called when packages are removed from the phone.

另请参见这个问题