获取Android中卸载应用程序的意图 [英] Get intent of uninstall app in android

查看:218
本文介绍了获取Android中卸载应用程序的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道,因为卸载应用程序的意图

I just want to know about intent of uninstall app because of

在我的应用程序,当用户打开使用PHP的第一个屏幕那么该设备ID将被保存在服务器端。

in my app when user opens the first screen then the device id will be saved in server side by using php.

当用户卸载该应用程序,然后自动设备将在服务器端被删除。

When user uninstall this app then automatically the device will be deleted in server side.

有关这一点,我prepared $ C $下的PHP删除设备ID。因此,当将我称之为webservive。

For this i prepared code for php for delete device id. So when will i call this webservive.

我试过低于code

public class MyReceiver extends BroadcastReceiver {

@Override
 public void onReceive(Context context, Intent intent) {
 String action = intent.getAction(); 
 if("android.intent.action.PACKAGE_REMOVED".equals(action)){
   // here i wrote the code of  delete device id in server side
}

但它不工作,因为意图没有被引发。所以,请告诉我什么意图将提高,当用户卸载应用程序或告诉我任何建议解决我的问题。

But it is not working because the intent was not raised. So please tell me what intent will be raise when user uninstall the app or tell me any suggestions for solve my problem.

在此先感谢。

问候

推荐答案

您不能卸载意图为自己的应用程序。看到这个线程多 - 获取应用程序卸载事件的android

You cannot get the uninstall intent for your own app. See this thread for more - Get application uninstall event in android

这篇关于获取Android中卸载应用程序的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆