Gallery crashes on invoking from app: Android 3.0 SDK
I am invoking the gallery, so that a user can select a photo 开发者_StackOverflowto import into my app, however, the gallery just seems to crash as soon as it is invoked...
Any ideas if this is a known issue or would I be doing something wrong by invoking using the following:
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, ACTIVITY_SELECT_IMAGE);
Or the following:
Intent i = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);
startActivityForResult(i, ACTIVITY_SELECT_IMAGE);
Thanks, Sonny
Tested on an actual Xoom, seems to work fine:
startActivityForResult(new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI),
SOME_REQUEST_CODE);
(I suppose it's the "INTERNAL" vs. "EXTERNAL" content URI).
精彩评论