I am developing an app which, as part of its functionality, selects a picture from the picture gallery via Intents. The picture gallery shows up, but when I click on it to select a picture, it either doesn't respond or it restarts the picture gallery, or it goes into extended edit mode for the picture gallery (allowing you to delete picture, for example), but I am largely unable to simply select a picture.. I have actually spent a solid 20-30 minutes trying to select one picture unsuccessfully.
This same functionality works fine on all other emulators and devices I've tried it on (in the range of 6-12 emulators/devices), so I think it's a problem with the Android Intel Atom emulator itself. (I installed it using the Android SDK Manager).
Can someone look into it ?
Thanks,
Gino.
链接已复制
3 回复数
I know this is an old post, but I have recently come across this bug as well. This is the code I'm using to launch the gallery intent. On an arm emulator, everything seems to work, whereas on an x86 emulator, I get the same behaviour ginolee reported.
Hope this helps:
private void loadImageFromDisk() { Intent loadFileIntent = new Intent(Intent.ACTION_GET_CONTENT); loadFileIntent.setType("image/*"); startActivityForResult(Intent.createChooser(loadFileIntent, "Select File to Load"), LOAD_IMAGE_REQUEST_CODE); }
I thought there was something wrong with my original code, so I changed it to this, with the same result:
private void loadImageFromDisk() { Intent loadFileIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(loadFileIntent, LOAD_IMAGE_REQUEST_CODE); }
