Android Question Get a List of intents an application will accept.

MrKim

Well-Known Member
Licensed User
I have spent my requisite hour searching the forum and didn't find what I was looking for so time for a new question.

As I understand it you can get a list of applications that will accept a given intent, but what I need to do is get a list of all the intents that a given application will accept.

Evidently the only way to do this would be to query for ALL available intents and see which ones the given application accepts. I can do that, BUT.

Do do this would require a list of ALL AVAILABLE INTENTS on the device. I don't see a way to get that list.

What I am trying to accomplish:

I want to create an app that allows the user to choose from the list of available apps and then choose how to launch it - including any extras such as filename to open.

Thanks in advance for your help.
 

Erel

Administrator
Staff member
Licensed User
Evidently the only way to do this would be to query for ALL available intents and see which ones the given application accepts.
You cannot. The are no limits on the possible action values.

There is a GET_INTENT_FILTERS flag in PackageManager. Seems like it is not working: https://issuetracker.google.com/issues/36908355
https://developer.android.com/reference/android/content/pm/PackageManager.html#GET_INTENT_FILTERS

You will not be able to find this information without getting the intent filters.

You can build a large range of popular intents and check them with QueryIntentActivities.
 

MrKim

Well-Known Member
Licensed User
You cannot. The are no limits on the possible action values.

There is a GET_INTENT_FILTERS flag in PackageManager. Seems like it is not working: https://issuetracker.google.com/issues/36908355
https://developer.android.com/reference/android/content/pm/PackageManager.html#GET_INTENT_FILTERS

You will not be able to find this information without getting the intent filters.

You can build a large range of popular intents and check them with QueryIntentActivities.
Thanks for the input, Erel,
I found something online https://play.google.com/store/apps/details?id=jp.susatthi.ManifestViewer. Evidently you can access the apk for all apps and read the intents from he manifest.xml.
But I am not going that far:p.
You would think Google would do this and build an online db that could be accessed for reach app.
 
Top