【发布时间】:2011-04-07 21:54:38
【问题描述】:
public class Unistallreceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
String action = intent.getAction();
if (action == null)
Log.e("uninstall ", "Action==null!");
else if ("android.intent.action.BOOT_COMPLETED".equals(action)) {
Log.e("uninstall ", "action :"+action);
}
}
}
做这样的事情,但无法得到通知。参考说:
公共静态最终字符串 ACTION_PACKAGE_REMOVED
自:API 级别 1 广播动作:现有应用程序包已从设备中删除。数据包含包的名称。 正在安装的包没有收到这个 Intent
需要这个意图来设置卸载密码。
有什么建议吗??
【问题讨论】:
-
请看这篇文章以获得答案:[stackoverflow.com/questions/21756180/… [1]: stackoverflow.com/questions/21756180/…