Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List intent filters for installed packages

Tags:

I want to list out the activity intent filters for the packages installed on my phone. This is just for a learning experience, I want to understand what apps can be started with implicit intents and how the intent filters are set up.

Google provides a table for the applications they provide at http://developer.android.com/guide/appendix/g-app-intents.html. I’m looking to create a similar list for other applications.

Can I use the PackageManager and dig this info up in code? Does anyone know of an existing app that can do this? Can anyone point me to an existing example to do what I want?

Sorry if this is a duplicate of similar questions like Listing an application's activity and intent-filters? and Android -- How to get a list of all available intent filters ?

like image 877
Michael Levy Avatar asked Jan 06 '11 20:01

Michael Levy


People also ask

What are the intent filters?

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.

What are the different types of intent?

There are two types of intents in android: implicit and explicit.

What is intent filters and broadcast receivers?

BroadcastReceiver : 'Gateway' with which your app tells to Android OS that, your app is interested in receiving information. Intent-Filter : Works with BroadcastReceiver and tells the 'What' information it is interested to receive in. For example, your app wants to receive information on Battery level.

What is intent filter category?

The intent filter specifies the types of intents that an activity, service, or broadcast receiver can respond. Intent filters are declared in the Android manifest file.


2 Answers

AFAIK there is no way to list all intents that a specific application can receive. However, you can get similar (albeit not as expansive) information by creating some intents yourself then using PackageManager's queryIntentActivities, queryIntentservices, and queryBroadcastReceivers to see what applications are installed that will react to that intent.

like image 101
Ginger McMurray Avatar answered Sep 24 '22 05:09

Ginger McMurray


Let me recommend the app "ManifestViewer". It lists intents for each installed app. https://play.google.com/store/apps/details?id=jp.susatthi.ManifestViewer

Have a nice day !!

like image 43
Someone Somewhere Avatar answered Sep 22 '22 05:09

Someone Somewhere