我只是想了解卸载应用程序的意图因为
在我的应用程序中,当用户打开第一个屏幕时,设备ID将通过使用php保存在服务器端.
当用户卸载此应用程序时,将自动删除设备在服务器端.
为此我为php准备了删除设备ID的代码.所以我什么时候才能称这个为webservive.
我试过下面的代码
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
}
Run Code Online (Sandbox Code Playgroud)
但它没有奏效,因为没有提出意图.所以请告诉我当用户卸载应用程序或者告诉我任何解决问题的建议时会产生什么意图.
提前致谢.
问候