Mapping images on sdcard with MediaStore

All your problems with Audio, Video and Images.

Mapping images on sdcard with MediaStore

Postby FrEaKmAn » Tue Oct 26, 2010 1:38 pm

Hello

I'm developing an app where I want to offer users to upload photos. My goal is to limit the list of photos and allow only images taken by camera (not downloaded to sdcard or anything similar).

All images taken by camera are stored in sdcard/images (I'm not sure where if sdcard is not present). I there a way I could map MediaStore to folder?

Because then I could create simple GridView of images and show only those in sdcard/images folder..
FrEaKmAn
Freshman
Freshman
 
Posts: 3
Joined: Tue Oct 19, 2010 11:31 pm

Top

Re: Mapping images on sdcard with MediaStore

Postby ravindra_kamble » Wed Oct 27, 2010 8:07 am

I am also suffering from the same problem. Because different devices has different camera folder, like for HTC Incredible stores the camera photos in emmc/DCIM/100ANDRO/....

How should we get this folder locations in the device.. any settings to get programmatically?
ravindra_kamble
Freshman
Freshman
 
Posts: 4
Joined: Fri Jun 04, 2010 4:53 pm

Re: Mapping images on sdcard with MediaStore

Postby Schermvlieger » Wed Oct 27, 2010 8:21 am

What I would do is get a list of all the images from the content provider and present the user with a list of the unique bucketID/displayNames from that list. The chooser can then pick the folder where the camera pictures are stored.
Schermvlieger
Senior Developer
Senior Developer
 
Posts: 159
Joined: Fri Feb 26, 2010 1:37 pm

Re: Mapping images on sdcard with MediaStore

Postby FrEaKmAn » Wed Oct 27, 2010 10:30 pm

Schermvlieger wrote:What I would do is get a list of all the images from the content provider and present the user with a list of the unique bucketID/displayNames from that list. The chooser can then pick the folder where the camera pictures are stored.


so I could group them by bucketid? does that define in which folder it is?
FrEaKmAn
Freshman
Freshman
 
Posts: 3
Joined: Tue Oct 19, 2010 11:31 pm

Re: Mapping images on sdcard with MediaStore

Postby Schermvlieger » Wed Oct 27, 2010 10:36 pm

yes bucketID and folder name are 1-on-1 related
Schermvlieger
Senior Developer
Senior Developer
 
Posts: 159
Joined: Fri Feb 26, 2010 1:37 pm

Re: Mapping images on sdcard with MediaStore

Postby FrEaKmAn » Sat Oct 30, 2010 4:34 pm

I tested this on my Samsung Galaxy Spica and bucket name is Camera.. everything works just fine

while testing it on my friends HTC Desire it does NOT work.. any ideas how to get universial bucket id or name??
FrEaKmAn
Freshman
Freshman
 
Posts: 3
Joined: Tue Oct 19, 2010 11:31 pm

Top

Re: Mapping images on sdcard with MediaStore

Postby Schermvlieger » Sat Oct 30, 2010 10:06 pm

FrEaKmAn wrote:I tested this on my Samsung Galaxy Spica and bucket name is Camera.. everything works just fine

while testing it on my friends HTC Desire it does NOT work.. any ideas how to get universial bucket id or name??


This is normal; bucket id is automatically generated, like the primary key in the database.
So you' ll have to make a way/user interface for the user to select the folder on their phone.
Schermvlieger
Senior Developer
Senior Developer
 
Posts: 159
Joined: Fri Feb 26, 2010 1:37 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 13 guests