0

When sending images to other apps with ACTION_SEND, does using Intent.setType("image/*") and Intent.setType("image/jpeg") make a difference in the list of apps displayed by android's intent chooser.

Ideally we would like to send "png" and "jpeg" images to other apps and we would want Intent chooser to display all the apps that can handle these images. Does using a mimeType of "image/*" make Intent chooser to prune out apps that can handle both "png" and "jpeg" images but cannot handle other image formats.

Prat
  • 11
  • 3

1 Answers1

0

You need to provide an extra (EXTRA_MIME_TYPES) parameter with your intent that takes an array of string and this array contains different image types that you want to support.

String[] mimeTypes = {"image/jpeg", "image/png"};
Intent intent = new Intent(Intent.ACTION_SEND)
        .setType("image/*")
        .putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
Ghulam Moinul Quadir
  • 1,638
  • 1
  • 12
  • 17