开发者

Why do I need to specify schema for ACTION_PACKAGE_ADDED intent filters?

开发者 https://www.devze.com 2023-01-31 06:41 出处:网络
In my app, I\'m trying to listen to broadcast intents with action ACTION_PACKAGE_ADDED. But unless I also specify data schema package, 开发者_运维技巧my broadcast receiver doesn\'t ever get activated.

In my app, I'm trying to listen to broadcast intents with action ACTION_PACKAGE_ADDED. But unless I also specify data schema package, 开发者_运维技巧my broadcast receiver doesn't ever get activated. Why do I need to specify the data schema?


Because the Intent that is broadcast has a Uri, and Intent resolution rules dictate that you must have a filter that matches the Uri.

0

精彩评论

暂无评论...
验证码 换一张
取 消