P. Falstad avatar image
P. Falstad asked

can't bring up gallery app on Kindle Fire HDX

I use this code on other android devices to bring up the gallery app. When I try it on Kindle Fire, I get "No apps can perform this action." How can I bring up the gallery app? (I know about ACTION_GET_CONTENT, that's working fine for picking images, but that's not what I want here. I want the user to be able to view images and watch videos.) String title = "Gallery"; Intent gallery = new Intent(Intent.ACTION_MAIN, null); gallery.addCategory(Intent.CATEGORY_APP_GALLERY); Intent chooser = Intent.createChooser(gallery, title); startActivity(chooser);
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hey Falstad, Thank you for reaching out. Not all the intents are available in Kindle devices. More details : Looking at you issue. You are correct that, mentioned code would not resolve to any activity in Kindle devices. Alternatively, to show picture or video collection of the device to user and let the user to select a media from there, you can use below code in Kindle devices. 1, Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, ""), PICK_IMAGE); 2. Intent mediaChooser = new Intent(Intent.ACTION_GET_CONTENT); //comma-separated MIME types mediaChooser.setType("video/*, images/*"); startActivityForResult(mediaChooser, RESULT_LOAD_IMAGE); 3. Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT); galleryIntent.setType("*/*"); startActivityForResult(galleryIntent, RESULT_LOAD_IMAGE);
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.