Get gallery image on android

-1

I would like it to open in Image Gallery, not Image

contactImgView.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                     Intent intent = new Intent(Intent.ACTION_VIEW, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); //coloquei assim, esta certo ?
            intent.setAction(Intent.ACTION_GET_CONTENT);
            intent.setType("image/*");
            startActivityForResult(Intent.createChooser(intent, "Select Contact Image"), 1);
       }
});

When I open the bluestack emulator, instead of the Intent open in the gallery, it opens in Image and hence I need to select the gallery, but I just wanted it to open directly in Galeria, how?

    
asked by anonymous 29.06.2015 / 17:31

1 answer

0

Try moving to URI of Media.EXTERNAL_CONTENT_URI . p>

Intent galeriaIntent = new Intent(Intent.ACTION_VIEW, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivity(galeriaIntent);
    
29.06.2015 / 17:54