How to get list of all BroadcastReceiver(s) registered for a specific intent?
From a program you can use PackageManager
and queryBroadcastReceivers()
.
From the 'adb shell', try the command:
dumpsys activity
the Activity Resolver Table lists all the things that broadcast receivers are looking for.
Showing all broadcast events on Android
List all historical broadcasts and registered broadcast receivers with the following terminal command:
$ adb shell dumpsys activity broadcasts
Is there a list of ordered Broadcast receiver's list?
There aren't many. This isn't an exhaustive list, but here are a few examples:
android.intent.action.DATA_SMS_RECEIVED
android.provider.Telephony.SMS_CB_RECEIVED
android.provider.Telephony.SMS_RECEIVED
android.intent.action.CAMERA_BUTTON
android.intent.action.MEDIA_BUTTON
android.intent.action.SCREEN_OFF
android.intent.action.SCREEN_ON
android.intent.action.NEW_OUTGOING_CALL (you aren't allowed to abort this)
If you just want to test the behaviour, you can create your own broadcast Intent
and register some receivers and then send an ordered broadcast.
Android list of events/broadcast receivers
There is no "complete list".
Many broadcast Intents
are documented on the Intent
class. Some broadcast Intents
are documented on other classes (e.g., ConnectivityManager
, TelephonyManager
). Some broadcast Intents
are not documented and should not be used.
And those are just the ones in the OS.
Android: How to get a list of all available intent filters?
PackageExplorer lists all intent-filters defined in apps in your device
To answer your question: You create the intent-filter(s) you want to be used to cause your activity to be selected when a program is looking for a service or activity. So each Activity in a Package defines it own list of intent-filters.
I found it useful to have a list of all intent-filters defined by all the applications on a device -- so would know what apps the system would invoke when an intent was processed. I put a free app on Android Market, search for 'Package Explorer' that searches all apps it can find on your device, decodes the AndroidManifest.xml file and displays a list of all intent-filters defined by all apps. The table of all intent-filters can be sorted by Action, Category, Data fields(ie scheme or mimetype), package name or intent-filter type so you can find all Activites on your device that respond to various Actions or Categories.
Package Explorer also collects all uses-permissions fields in the manifest and displays a list of which apps require which permissions. So you can find all packages that use 'SEND_SMS' or something like that. Clicking on the name of a package displays the decoded (uncompressed binary) AndroidManifest.xml for the package.
Android dev: How I can find the list of all avaiable intent-filter actions for a receiver?
PackageExplorer lists all intent-filters defined in apps in your device.More information can be had from this link
Android -- How to get a list of all available intent filters ?
Using java method , you can read androidmanifest xml to binary format.Then you can write to a text file.The below link talka about that.
How to parse the AndroidManifest.xml file inside an .apk package
Hope this will help you.
How to determine the sender of Broadcast Intent
No.
If you only want to do something when an action was broadcast by another app (i.e. not yours), I imagine it should be easy to determine that your app didn't send this broadcast, and therefore it was someone else..
how to get all value from broadcast intent one by one?
Change the 0
in the
val sentPI = PendingIntent.getBroadcast(smsService.applicationContext, 0, sentIntent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
to index
, like this
`val sentPI = PendingIntent.getBroadcast(smsService.applicationContext, index, sentIntent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)`
Related Topics
Handle a View Visibility Change Without Overriding the View
How to Setup Appium in Ubuntu for Android
How to Set Delay in Android Onclick Function
How to Restrict Content Provider Data Across Applications
Android Support Multidex Library Implementation
Realm with Pre Populated Data into Assets
Single Click and Double Click of a Button in Android
Displaying Contact Number and Contact Name in a Custom List View
Notifydatasetchanged Not Working on Recyclerview
How to Find the Android Version Name Programmatically
How to Configure Launcher Activity Programmatically in Android
Android 'Debuggable' Default Value
Bufferoverflowexception When Building Application
Android - Detecting Application Launch from Home or History
Analyticsservice Not Registered in the App Manifest - Error
Android Translate Animation - Permanently Move View to New Position Using Animationlistener