android.intent.action.PACKAGE_ADDED

本文详细解析了Android系统中的ACTION_PACKAGE_ADDED广播的工作原理及其包含的关键信息,如新安装应用的包名、系统分配的应用ID及是否为重新安装等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

String android.content.Intent.ACTION_PACKAGE_ADDED = "android.intent.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.

My include the following extras:

* EXTRA_UID containing the integer uid assigned to the new package.
* EXTRA_REPLACING is set to true if this is following an ACTION_PACKAGE_REMOVED broadcast for the same package.

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

----------

当系统中新安装了一个软件或重新安装一个软件都会触发这个action的广播,
并发送intent给接收者,发送的intent中包话新安装应用的包名、系统指定给这个应用的ID、标识是否这个广播是在ACTION_PACKAGE_REMOVED广播发送之后发送的。

这种广播只能系统来发送。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值