I'm running into something very similar trying to get thumbnails.
I use this to get select the image from the gallery:

Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
intent.putExtra("return-data", true);
startActivityForResult(Intent.createChooser(intent,"Complete action 
using"),PICK_FROM_GALLERY);

Then in the result:

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (resultCode != Activity.RESULT_OK)
      return;

   Uri contentUri = Uri.parse(data.getDataString());
   List<String> parts = contentUri.getPathSegments();
   long id = Long.parseLong(parts.get(parts.size() - 1));
   Bitmap bitmap = MediaStore.Images.Thumbnails.getThumbnail(
      getActivity().getContentResolver(), 
      id, 
      MediaStore.Images.Thumbnails.MINI_KIND, 
      null
   );

}

If I log data.getDataString(), I get: 
content://com.android.gallery3d.provider/picasa/item/SOMEBIGNUMBER

And I get an exception thrown:
E/MiniThumbFile(26253): Got exception when reading magic, id = 
SOMEBIGNUMBER, disk full or mount read-only? class 
java.lang.IllegalArgumentException

Local images work fine, and have a different url:
content://media/external/images/media/115

I'm guessing SOMEBIGNUMBER is the PICASA_ID. How to get the thumbnail and/or 
image out of that, without falling back to accessing the picasa api's and 
having to have access to user account info... I wish I knew.

-- 
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

Reply via email to