1

I'm using the following code to let the user select a photo from their device. This is pretty standard and will display the typical chooser dialog showing a list of possible applications that can handle this event.

Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"), Constants.PICK_PHOTO);

I want to exclude Picasa from this list. Is there a way to do this? Thanks.

Henrique
  • 4,921
  • 6
  • 36
  • 61
  • Why do you want to exclude *Picasa*? – Phil Jan 03 '14 at 14:35
  • Basically because Picasa handles image URIs in a different way then the normal image chooser and I wanted to know if there a quick, 2 minute fix for now before actually implementing the code for this edge case. – Henrique Jan 03 '14 at 14:40
  • If someone has Picasa installed and it shows up for every app except yours, users will think it's a bug (unless you explain it, but why should they care about URI formats?). – molnarm Jan 03 '14 at 15:01
  • You basically need to handle this differently. The issue is explained here (there's also a solution here, but I just wanted to know it this was possible in Android): http://dimitar.me/how-to-get-picasa-images-using-the-image-picker-on-android-devices-running-any-os-version/ – Henrique Jan 03 '14 at 15:11

2 Answers2

1

You can use PackageManager.queryIntentActivities to determine which apps can handle the intent, then create a custom chooser dialog. For more details related to how to do this, see Custom filtering of intent chooser based on installed Android package name and Custom ListView in a dialog.

Community
  • 1
  • 1
Phil
  • 35,852
  • 23
  • 123
  • 164
0

No, you can't remove any apps from this list. You can only ask a user to choose your app (for example before the list is displayed).

XorOrNor
  • 8,868
  • 12
  • 48
  • 81