android.intent.action.PACKAGE_CHANGED

String android.content.Intent.ACTION_PACKAGE_CHANGED = "android.intent.action.PACKAGE_CHANGED"

Broadcast Action: An existing application package has been changed (e.g. a component has been enabled or disabled). The data contains the name of the package.

* EXTRA_UID containing the integer uid assigned to the package.
* EXTRA_CHANGED_COMPONENT_NAME_LIST containing the class name of the changed components.
* EXTRA_DONT_KILL_APP containing boolean field to override the default action of restarting the application.

This is a protected intent that can only be sent by the system.

------------------

当一个应用被改变时会触发这个广播,比如这个应用被设置为不可用或可用时。其实我到现在还不知道这个包在哪里用过,我看过launcher应用中用了这东东,但测试了下,发现重新安装应用也不会触发这个广播,而是先删除后增加。

在这个change广播中,intent包括如下数据:
1.被改变的应用的包名
2.被改变的应用的ID
3.被改变的应用的类名列表
4.是否重起这个应用

这个广播只能由系统发出。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值