views:

51

answers:

1

ContentResolver cr = getContentResolver(); Uri pic = Uri.parse("content://media/external/images/media/3"); Bitmap bm = Media.getBitmap(cr,pic);

The above code is written in onCreate method of my Activity class. It throws the following error:

08-30 12:27:22.352: WARN/System.err(245): java.io.FileNotFoundException: No content provider: [content://media/external/images/media/3]

What could be wrong? The file in question is there because I launched Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI) in another method and got back the Uri of the picked image from the returned intent.

A: 

Okay, I found the issue. I was giving the wrong Uri. I was giving "[content://blahblah]" where as I should have given "content://blahblah".

savtargm