Custom filtering of intent chooser based on installed Android package name?

The only one additional parameter for the chooser is Intent. EXTRA_INITIAL_INTENTS Its description is: A Parcelable of Intent or LabeledIntent objects as set with putExtra(String, Parcelable) of additional activities to place a the front of the list of choices, when shown to the user with a ACTION_CHOOSER I haven't found any way in Android sources to exclude other activities from the list, so it seems there's no way to do what you want to do using the chooser EDIT : That's really easy to find out. Just check ChooserActivity and ResolverActivity source code.

These classes are rather small.

The only one additional parameter for the chooser is Intent. EXTRA_INITIAL_INTENTS. Its description is: A Parcelable of Intent or LabeledIntent objects as set with putExtra(String, Parcelable) of additional activities to place a the front of the list of choices, when shown to the user with a ACTION_CHOOSER.

I haven't found any way in Android sources to exclude other activities from the list, so it seems there's no way to do what you want to do using the chooser. EDIT: That's really easy to find out. Just check ChooserActivity and ResolverActivity source code.

These classes are rather small.

It seems that what I was looking for is not possible, so you were closest (and only). – Kon Apr 26 at 0:52.

I'd like to leverage the built-in intent chooser to display a custom filtered list of apps for user to select from and launch. At this point I want to filter the list based on a specific string (or variation of strings) contained within the package name, which I can figure out how to do as well. But here's where I get stuck.

As far as I know, Intent.createChooser() takes only a single target Intent as a parameter. I was hoping there was an overload that took a list of intents based on package and class names or something. But I don't see anything like that.

Did I miss that somewhere? So the question is, is this possible to do with a built-in chooser, or do I have to construct my own with AlertDialog Builder? I'm hoping to avoid the later.

Thanks in advance.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions