Hi guys,

I am trying to make an application which will upload pictures to a
website. I need to let the user browse through the pictures they want
to upload and select them. However, when I try to use the MediaStore I
always get an empty cursor.

I created an SD CARD image and used that with the emulator. I know one
image exists in /sdcard/media. I copied it using an image manipulation
tool (winimage). And, I can see the image when I use the command "ls /
sdcard/media" in the terminal application of the phone.

The code I am using is this :

=============
                // Here we set up a string array of the thumbnail ID column we 
want
to get back
                String [] proj={MediaStore.Images.Thumbnails._ID};
                // Now we create the cursor pointing to the external thumbnail 
store
                cursor = managedQuery
( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,
                                proj, // Which columns to return
                                null,       // WHERE clause; which rows to 
return (all rows)
                                null,       // WHERE clause selection arguments 
(none)
                                null); // Order-by clause (ascending by name)
                // We now get the column index of the thumbnail id
                Log.i(tag, "size: ");
                Log.i(tag, "size: "+cursor.getCount());
==============

Am I missing something here?

Thanks in advance for the help,

Moazzam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to