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);
}
}
做这样的事情,但不能得到notification.Reference说:
公共静态最后弦乐ACTION_PACKAGE_REMOVED
从以下版本开始:API级别1 广播操作:现有应用程序包已从设备中删除。数据包含软件包的名称。 正在安装的软件包未收到此意向
需要此意图来设置卸载密码。
有什么建议?
请看到这个帖子的回答: [http://stackoverflow.com/questions/21756180/ask-for-password-before-uninstalling-application][1] [ 1]:http://stackoverflow.com/questions/21756180/ask-for-password-before-uninstalling-application – 2015-01-20 12:19:52