List<
ResolveInfo> android.content.pm.
PackageManager.queryBroadcastReceivers(
Intent intent,
int flags)
Retrieve all receivers that can handle a broadcast of the given intent.
-
Parameters:
- intent The desired intent as per resolveActivity().
- flags Additional option flags. Returns:
- A List<ResolveInfo> containing one entry for each matching Receiver. These are ordered from first to last in priority. If there are no matching receivers, an empty list is returned. See Also:
- MATCH_DEFAULT_ONLY
- GET_INTENT_FILTERS
- GET_RESOLVED_FILTER
本文深入探讨了Android系统中如何使用Intent来查询可以处理特定广播的接收器,并解释了如何通过优先级参数来组织这些接收器。通过实例演示,读者将掌握如何在应用程序中高效地管理和利用广播接收器。
1101

被折叠的 条评论
为什么被折叠?



