Hello, I'm trying to launch a Gallery Intent to allow the user to select an image. The issue is that the code works on 2.x but fails occasionally on 4.x (I haven't tested 3.x). I've narrowed it down to issues specific to Picasa-sourced images. For example, from my google+ posts (still in the Gallery app).
The problematic URI is "content:// com.google.android.gallery3d.provider/picasa/item/<some ID>". Attempting to retrieve the image local path gives me the error : "W/ GalleryProvider( 8091): unsupported column: _data" My code is below: Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, PROFILE_PIC_RESULT); and then in onActivityResult(int requestcode, int resultcode, Intent data) : if(requestCode == PROFILE_PIC_RESULT && resultCode == RESULT_OK){ Uri selectedImage = data.getData(); String[] filePathColumn = {MediaStore.Images.Media.DATA}; Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null); cursor.moveToFirst(); int columnIndex = cursor.getColumnIndexOrThrow(filePathColumn[0]); String filePath = cursor.getString(columnIndex); } In 2.x, filePath will contain a useful string. In 4.x, filePath is null on some images because of the issue noted above. I found a similar bug report that seems to be suffering from the above problem: http://code.google.com/p/android/issues/detail?id=21234 Can anyone confirm? I might need to submit another bug report on this issue.. because it's frustrating that some images a user might pick will be invalid while others will be okay. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en