Muhammad Shahab
Muhammad Shahab

Reputation: 4270

Android: How to get a list of all available intent filters?

I have search Android docs and for some insane reason I am not able to find the list of all available intent filters.

I am finding an intent filter, which would do something like notifying me through Broadcast Receiver that a particular Activity (example browser, or email) has been started or in the foreground.

Can anyone help me with that?

Upvotes: 40

Views: 58073

Answers (10)

not2qubit
not2qubit

Reputation: 16910

Expanding on Tom Fraser's answer, the best way is by using dumpsys with a grep and sort.

dumpsys activity broadcasts |grep -iE ".+\.[0-9A-Z_\-]+:$" |sort

The grep expression makes sure to only catch lines ending in the intent like format of ...blahblah.SOME_INTENT:. It may not catch all, but it's a good start.

Upvotes: 8

Heiko Rupp
Heiko Rupp

Reputation: 30934

There is a "database" at http://www.openintents.org/intentsregistry/ that tries to collect known intent filters. Also the doumentation for Intent lists some.

Upvotes: 3

Sanchit Gupta
Sanchit Gupta

Reputation: 29

As on date this is list according to official documentation

android@intent@action@AIRPLANE_MODE
android@intent@action@ALL_APPS
android@intent@action@ANSWER
android@intent@action@APPLICATION_PREFERENCES
android@intent@action@APP_ERROR
android@intent@action@ASSIST
android@intent@action@ATTACH_DATA
android@intent@action@BATTERY_CHANGED
android@intent@action@BATTERY_LOW
android@intent@action@BATTERY_OKAY
android@intent@action@BOOT_COMPLETED
android@intent@action@BUG_REPORT
android@intent@action@CALL
android@intent@action@CALL_BUTTON
android@intent@action@CARRIER_SETUP
android@intent@action@CLOSE_SYSTEM_DIALOGS
android@intent@action@CONFIGURATION_CHANGED
android@intent@action@CREATE_DOCUMENT
android@intent@action@DATE_CHANGED
android@intent@action@VIEW
android@intent@action@DEFINE
android@intent@action@DELETE
android@intent@action@DEVICE_STORAGE_LOW
android@intent@action@DEVICE_STORAGE_OK
android@intent@action@DIAL
android@intent@action@DOCK_EVENT
android@intent@action@DREAMING_STARTED
android@intent@action@EDIT
android@intent@action@EXTERNAL_APPLICATIONS_AVAILABLE
android@intent@action@EXTERNAL_APPLICATIONS_UNAVAILABLE
android@intent@action@FACTORY_TEST
android@intent@action@GET_CONTENT
android@intent@action@GET_RESTRICTION_ENTRIES
android@intent@action@GTALK_CONNECTED
android@intent@action@GTALK_DISCONNECTED
android@intent@action@HEADSET_PLUG
android@intent@action@INPUT_METHOD_CHANGED
android@intent@action@INSERT
android@intent@action@INSERT_OR_EDIT
android@intent@action@INSTALL_FAILURE
android@intent@action@INSTALL_PACKAGE
android@intent@action@LOCALE_CHANGED
android@intent@action@LOCKED_BOOT_COMPLETED
android@intent@action@MAIN
android@intent@action@MANAGED_PROFILE_ADDED
android@intent@action@MANAGED_PROFILE_AVAILABLE
android@intent@action@MANAGED_PROFILE_REMOVED
android@intent@action@MANAGED_PROFILE_UNAVAILABLE
android@intent@action@MANAGED_PROFILE_UNLOCKED
android@intent@action@MANAGE_NETWORK_USAGE
android@intent@action@MANAGE_PACKAGE_STORAGE
android@intent@action@MEDIA_BAD_REMOVAL
android@intent@action@MEDIA_BUTTON
android@intent@action@MEDIA_CHECKING
android@intent@action@MEDIA_EJECT
android@intent@action@MEDIA_MOUNTED
android@intent@action@MEDIA_NOFS
android@intent@action@MEDIA_REMOVED
android@intent@action@MEDIA_SCANNER_FINISHED
android@intent@action@MEDIA_SCANNER_SCAN_FILE
android@intent@action@MEDIA_SCANNER_STARTED
android@intent@action@MEDIA_SHARED
android@intent@action@MEDIA_UNMOUNTABLE
android@intent@action@MEDIA_UNMOUNTED
android@intent@action@MY_PACKAGE_REPLACED
android@intent@action@MY_PACKAGE_SUSPENDED
android@intent@action@MY_PACKAGE_UNSUSPENDED
android@intent@action@NEW_OUTGOING_CALL
android@intent@action@OPEN_DOCUMENT
android@intent@action@OPEN_DOCUMENT_TREE
android@intent@action@PACKAGES_SUSPENDED
android@intent@action@PACKAGES_UNSUSPENDED
android@intent@action@PACKAGE_ADDED
android@intent@action@PACKAGE_CHANGED
android@intent@action@PACKAGE_DATA_CLEARED
android@intent@action@PACKAGE_FIRST_LAUNCH
android@intent@action@PACKAGE_FULLY_REMOVED
android@intent@action@PACKAGE_INSTALL
android@intent@action@PACKAGE_NEEDS_VERIFICATION
android@intent@action@PACKAGE_REMOVED
android@intent@action@PACKAGE_REPLACED
android@intent@action@PACKAGE_RESTARTED
android@intent@action@PACKAGE_VERIFIED
android@intent@action@PASTE
android@intent@action@PICK
android@intent@action@PICK_ACTIVITY
android@intent@action@ACTION_POWER_CONNECTED
android@intent@action@ACTION_POWER_DISCONNECTED
android@intent@action@POWER_USAGE_SUMMARY
android@intent@action@PROCESS_TEXT
android@intent@action@PROVIDER_CHANGED
android@intent@action@QUICK_CLOCK
android@intent@action@QUICK_VIEW
android@intent@action@REBOOT
android@intent@action@RUN
android@intent@action@SCREEN_OFF
android@intent@action@SCREEN_ON
android@intent@action@SEARCH
android@intent@action@SEARCH_LONG_PRESS
android@intent@action@SEND
android@intent@action@SENDTO
android@intent@action@SEND_MULTIPLE
android@intent@action@SET_WALLPAPER
android@intent@action@SHOW_APP_INFO
android@intent@action@ACTION_SHUTDOWN
android@intent@action@SYNC
android@intent@action@SYSTEM_TUTORIAL
android@intent@action@TIMEZONE_CHANGED
android@intent@action@TIME_SET
android@intent@action@TIME_TICK
android@intent@action@TRANSLATE
android@intent@action@UID_REMOVED
android@intent@action@UMS_CONNECTED
android@intent@action@UMS_DISCONNECTED
android@intent@action@UNINSTALL_PACKAGE
android@intent@action@USER_BACKGROUND
android@intent@action@USER_FOREGROUND
android@intent@action@USER_INITIALIZE
android@intent@action@USER_PRESENT
android@intent@action@USER_UNLOCKED
android@intent@action@VIEW
android@intent@action@VIEW_LOCUS
android@intent@action@VIEW_PERMISSION_USAGE
android@intent@action@VOICE_COMMAND
android@intent@action@WALLPAPER_CHANGED
android@intent@action@WEB_SEARCH
android@intent@category@ALTERNATIVE
android@intent@category@APP_BROWSER
android@intent@category@APP_CALCULATOR
android@intent@category@APP_CALENDAR
android@intent@category@APP_CONTACTS
android@intent@category@APP_EMAIL
android@intent@category@APP_FILES
android@intent@category@APP_GALLERY
android@intent@category@APP_MAPS
android@intent@category@APP_MESSAGING
android@intent@category@APP_MUSIC
android@intent@category@BROWSABLE
android@intent@category@CAR_DOCK
android@intent@category@CAR_MODE
android@intent@category@DEFAULT
android@intent@category@DESK_DOCK
android@intent@category@DEVELOPMENT_PREFERENCE
android@intent@category@EMBED
android@intent@category@FRAMEWORK_INSTRUMENTATION_TEST
android@intent@category@HE_DESK_DOCK
android@intent@category@HOME
android@intent@category@INFO
android@intent@category@LAUNCHER
android@intent@category@LEANBACK_LAUNCHER
android@intent@category@LE_DESK_DOCK
android@intent@category@MONKEY
android@intent@category@OPENABLE
android@intent@category@PREFERENCE
android@intent@category@SAMPLE_CODE
android@intent@category@SECONDARY_HOME
android@intent@category@SELECTED_ALTERNATIVE
android@intent@category@TAB
android@intent@category@TEST
android@intent@category@TYPED_OPENABLE
android@intent@category@UNIT_TEST
android@intent@category@VOICE
android@intent@category@VR_HOME
android@intent@extra@ALARM_COUNT
android@intent@extra@ALLOW_MULTIPLE
android@intent@extra@ALLOW_REPLACE
android@intent@extra@ALTERNATE_INTENTS
android@intent@extra@ASSIST_CONTEXT
android@intent@extra@ASSIST_INPUT_DEVICE_ID
android@intent@extra@ASSIST_INPUT_HINT_KEYBOARD
android@intent@extra@ASSIST_PACKAGE
android@intent@extra@ASSIST_UID
android@intent@extra@AUTO_LAUNCH_SINGLE_CHOICE
android@intent@extra@BCC
android@intent@extra@BUG_REPORT
android@intent@extra@changed_component_name
android@intent@extra@changed_component_name_list
android@intent@extra@changed_package_list
android@intent@extra@changed_uid_list
android@intent@extra@CHOOSER_REFINEMENT_INTENT_SENDER
android@intent@extra@CHOOSER_TARGETS
android@intent@extra@CHOSEN_COMPONENT
android@intent@extra@CHOSEN_COMPONENT_INTENT_SENDER
android@intent@extra@COMPONENT_NAME
android@intent@extra@CONTENT_ANNOTATIONS
android@intent@extra@CONTENT_QUERY
android@intent@extra@DATA_REMOVED
android@intent@extra@DOCK_STATE
android@intent@extra@DONT_KILL_APP
android@intent@extra@DURATION_MILLIS
android@intent@extra@EMAIL
android@intent@extra@EXCLUDE_COMPONENTS
android@intent@extra@FROM_STORAGE
android@intent@extra@HTML_TEXT
android@intent@extra@INDEX
android@intent@extra@INITIAL_INTENTS
android@intent@extra@INSTALLER_PACKAGE_NAME
android@intent@extra@INTENT
android@intent@extra@KEY_EVENT
android@intent@extra@LOCAL_ONLY
android@intent@extra@LOCUS_ID
android@intent@extra@MIME_TYPES
android@intent@extra@NOT_UNKNOWN_SOURCE
android@intent@extra@ORIGINATING_URI
android@intent@extra@PACKAGE_NAME
android@intent@extra@PHONE_NUMBER
android@intent@extra@PROCESS_TEXT
android@intent@extra@PROCESS_TEXT_READONLY
android@intent@extra@QUICK_VIEW_FEATURES
android@intent@extra@QUIET_MODE
android@intent@extra@REFERRER
android@intent@extra@REFERRER_NAME
android@intent@extra@remote_intent_token
android@intent@extra@REPLACEMENT_EXTRAS
android@intent@extra@REPLACING
android@intent@extra@restrictions_bundle
android@intent@extra@restrictions_intent
android@intent@extra@restrictions_list
android@intent@extra@RESULT_RECEIVER
android@intent@extra@RETURN_RESULT
android@intent@extra@shortcut@ICON
android@intent@extra@shortcut@ICON_RESOURCE
android@intent@extra@shortcut@ID
android@intent@extra@shortcut@INTENT
android@intent@extra@shortcut@NAME
android@intent@extra@SHUTDOWN_USERSPACE_ONLY
android@intent@extra@SPLIT_NAME
android@intent@extra@STREAM
android@intent@extra@SUBJECT
android@intent@extra@SUSPENDED_PACKAGE_EXTRAS
android@intent@extra@TEMPLATE
android@intent@extra@TEXT
android@intent@extra@TITLE
android@intent@extra@UID
android@intent@extra@USER

Upvotes: 1

Tom Fraser
Tom Fraser

Reputation: 271

If you are off device you can just run the following:

adb shell dumpsys package r

This will give you a list of all the statically registered intent filters.

Upvotes: 27

IronBlossom
IronBlossom

Reputation: 3917

You can check the list of standard actions and categories in the sdk/platforms/android-x/data/broadcast_actions.txt

Upvotes: 2

sirvon
sirvon

Reputation: 2625

this post is old but for anyone looking for manifest info from apps installed on a particular android dwld this GOD app:

https://play.google.com/store/apps/details?id=jp.susatthi.ManifestViewer

Upvotes: 5

Ribo
Ribo

Reputation: 3429

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.

Upvotes: 39

friedger
friedger

Reputation: 645

There is GET_INTENTS_FILTER - declared to be be used in the future to query the intents filters, see also http://code.google.com/p/android/issues/detail?id=3217

However, priority at the Android team is small. Anybody up to submit a patch?

Upvotes: 4

Ribo
Ribo

Reputation: 3429

(partial answer) IntentFilters are defined in the AndroidManifest.xml file contained in the application's .apk file. (in the -> -> -> XML element, like this:

I haven't found an API for searching all Intents defined in all .apk files stored on a device. The system searches the list of all intents in: android.content.Context.startActivity(Intent intent) Which calls a native method in android.app.ActivityManagerNative.startActivity() which uses an interprocess communication (IPC) mechanism (using a serialization of the informtation in a 'Parcel' object) to search the intents and start the Activity. So I could find how it is really done.

It appears that you can get read access to .apk files (many are stored in /system/app/*.apk). The .apk file is a .jar file and the AndroidManifest.xml file is available in that, so a program should be able to read and parse the manifest and find the IntentFilters -- but there should be API to make this easy.

Upvotes: 3

Falmarri
Falmarri

Reputation: 48567

You're not going to find that. Intent filters are defined by the application. You'd have to look at the documentation for the paritcular application you're interested in.

Upvotes: 5

Related Questions