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. Choosing resolution over density for drawables

Stephen,

There is a whole bunch of qualifiers for resource folder names, described here: http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources You can do things like res/drawable-large, which should match both 480x800 and 480x854. -- Kostya 04.07.2010 11:12, Stephen Lebed :
I'm looking for a way to tell Android to use a specific drawable folder for specific device resolutions. I have graphics designed for 320x480 displays and 480x800 displays. Android wants to automatically pick the best graphics based on density. Is there a way to work around that? If the device supports 480x800 resolution, I'd like to use that, irregardless of density. Thanks, Stephen
-- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com --

2. Choosing resolution over density for drawables

I'm looking for a way to tell Android to use a specific drawable
folder for specific device resolutions.  I have graphics designed for
320x480 displays and 480x800 displays.  Android wants to automatically
pick the best graphics based on density.  Is there a way to work
around that?  If the device supports 480x800 resolution, I'd like to
use that, irregardless of density.

Thanks,
Stephen


-- 

3. why is there no android tablet nearly as good as ipad?

4. Problem with JNI - using Multiple Native Methods in a library

5. tanya wipe ext yang sudah app2sd

6. Popup Window like 'Quick Contact'

7. Android Huawei Aviator