retrieve all the images in phone and sdcard

by Xian Chen » Thu, 30 Apr 2009 05:41:10 GMT


Sponsored Links
 Hi,

How can I retrieve all the images both in phone memory and external sdcard?

I need the image path, name and size information.

Thanks in advance,
Xian

--~--~---------~--~----~------------~-------~--~----~



retrieve all the images in phone and sdcard

by Xian Chen » Thu, 30 Apr 2009 06:34:39 GMT


 Maybe I did not make the question clear.

What I want to do is retrieving all the images in phone and sdcard,
including file name, and image size. But I do not want the user to pick one
image, in other words, I want my activity to retrieve all the images the
user can see automatically and return some information.

So, I need the image ( or imageColumn) URI, but I cannot find it from the
document.

Anyone know this?

Thanks,
Xian





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


retrieve all the images in phone and sdcard

by Peli » Thu, 30 Apr 2009 08:04:40 GMT


 Use the media content provider:
 http://developer.android.com/guide/topics/providers/content-providers.html 
 http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html 

using something like this:
ContentResolver cr = getContentResolver();
Cursor cur = managedQuery
(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null,
null);

Peli
www.openintents.org





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Need to write to /cache for image update

I need to write to the /cache area for an image update.

We have an Java application that communicates to a daemon (C++) that
is currently started in the init.rc file.

This Java application pulls down a system image from a secure website
that is used to update the device.

This solution is not recommended and fails the compatibility testing
since it is bound to a port at startup (which is how the client
communicates to it).

In my research, I think that an application must drop a file into
the /
system/etc/permissions directory in order for it to have access
outside the Dalik VM.

I also think that the code must be packaged in a jar file and placed
in the /system/framework directory.

Is this information true?

Is there another method that I should pursue?

I have looked at the PlatformLibrary example in the froyo distribution
but it is unclear if the code can access the /cache area.


Thanks for your time.

-- 

2. horizontal list with vertical scroll

Does anyone know of a good way to create an AdapterView that will
sequentially place children horizontally until that line becomes full
and will wrap down to the next line (similar to word wrapping, but
with whole views).  I'm in a situation where I don't know at runtime
how wide my AdapterView will be (and thus how many columns of
children), and for that matter the width can change even after it's
been displayed.  For other reasons having a single Adapter to send
data to makes things much easier than having to maintain a "2D" mess
of Adapters.

-- 

3. hosted email users: getAuthToken from android device accesses *different* data to same request via ClientLogin/IssueAuthToken. Why?

4. Error compiling opencore in 64 bit system

5. appwidget icon set

6. Debugging Exceptions

7. Castor unmarshalling with Android's SAX DOM implementation throws: The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled