Android獲取指定Intent(Action)的所有BroadcastReceiver.

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章