Select image from gallery
I've seen many posts about this and it seems like the code below should work. I created an SD card image and added it to the emulator (and this works great).
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
//intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, 1);
It launches and allows the selection of images, but when I click on the image everything exits and the emulator goes back to the main screen, not back to my application. My onActivityResult is never called.
What am I missing?
+2
a source to share
2 answers