Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open image in android Built-In Gallery only

i need to open an image in the built in gallery only, with no intent chooser. if i use ACTION_VIEW, i automatically get the chooser.

is there any way to do this?

Tx,

like image 369
Shahar Avatar asked Oct 11 '22 05:10

Shahar


2 Answers

This opens the Gallery (not the picker). Tested on Android 2.3.3 on a Galacxy S

Intent intent = new Intent(Intent.ACTION_VIEW,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, 0);
like image 141
Cheborra Avatar answered Oct 18 '22 04:10

Cheborra


Built-in gallery can be opened like this:

Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, 0);
like image 20
Santosh Avatar answered Oct 18 '22 04:10

Santosh