Rahul Matte Rahul Matte - 1 month ago 14
Android Question

How to filter android file chooser apps

I am using below code to select the file from device

Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
startActivityForResult(intent,1212);


The above code give below output

sample out put

Is there any way to remove or filter the apps shown in dialog? for e.g. I want to remove both
com.android.contacts
from the dialog.

Answer

The intent type Intent.ACTION_PICK makes the app to open all other apps which are capable of doing the action Intent.ACTION_PICK. I have noticed it when I removed photos app, it's option was not showing in above popup.