程序安装/卸载事件监听


1.程序的安装卸载动作


关于程序安装完成的两个动作




public static final String ACTION_PACKAGE_ADDED


   Broadcast Action: A new application package has been installed on the device. The data contains    the name of the package. Note that the newly installed package does not receive this broadcast.
    意思是说第一接收到的广播 1.包含 程序包的名字2.注意你安装的程序自己不会接收自己的安装完成的广播
   不过必须同时添加这个<data>这个标签才能起到监听的作用


< intent-filter>
< action android:name="android.intent.action.PACKAGE_REMOVED" />
< data android:scheme="package"/>
< /intent-filter>


public static final String ACTION_PACKAGE_INSTALL


   This constant is deprecated.
    This constant has never been used.
    Broadcast Action: Trigger the download and eventual installation of a package. 
  Input: getData() is the URI of the package file to download.


  这个应该是说程序安装完成之后,你可以在添加了此动作的 BroadcastReciver里面下载这个程序包










评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值