Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 691
Muhammad Shahab Avatar asked Nov 04 '10 05:11

Muhammad Shahab


People also ask

Can an activity have multiple Intent filters?

However, since a component can have multiple intent filters, an intent that does not pass through one of a component's filters might make it through on another. An <intent-filter> element in the manifest file lists actions as <action> subelements. For example: <intent-filter . . . >

How many types of android Intent are there?

There are two intents available in android as Implicit Intents and Explicit Intents.

What is difference between Intent and Intent filter in android?

An intent is an object that can hold the os or other app activity and its data in uri form.It is started using startActivity(intent-obj).. \n whereas IntentFilter can fetch activity information on os or other app activities.

What is Intent filter in android manifest?

An intent filter is an expression in an app's manifest file that specifies the type of intents that the component would like to receive. For instance, by declaring an intent filter for an activity, you make it possible for other apps to directly start your activity with a certain kind of intent.


1 Answers

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.

like image 107
Ribo Avatar answered Oct 17 '22 04:10

Ribo