For my application, I'd been using my own Camera class for taking images and my own database but soon enough I couldn't really keep up with changes and I decided to use the built in camera application in Android to do the job, but I can't seem to get it to save file. What am I missing here? The application seems to save the file but it's...
Hi, am looking for a way to find images on the SD card, or at least images taken by the camera.
The ideal solution would be getting a collection of file paths or URIs for the images. I guessing you can do this through the MediaStore I just can't figure out how.
Thank you
...
So I'm trying to allow the user to pick a particular piece of media with my Android Application using the method described here:
http://stackoverflow.com/questions/550905/access-pictures-from-pictures-app-in-my-android-app
It works great, except for the fact that I can seemingly only choose between either Video or Photo to present the u...
So our app has the option to take either a picture or a video. If the user takes a picture, we can use the MediaStore.Images.Media.insertImage function to add the new image (via a filepath) to the phone's gallery and generate a content:// style URI. Is there a similar process for a captured video, given that we only have it's filepath?
...
Hi! I'm interested in capturing media to use in my activity in two ways:
1) capturing immediately from the supplied app. (like http://stackoverflow.com/questions/2314958/using-the-camera-activity-in-android)
Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
this.startActivityForResult(camera, PICTURE_RESULT);
2...
I manage media (images, sound) of my app directly, reading and saving to the SD card. Should I be using the MediaStore instead? I'm not quite sure what the MediaStore is for, and the javadoc is not very helpful.
When should an app use the MediaStore? A brief overview of the pros and cons of the MediaStore will be much appreciated.
...
Hi everyone,
I just don't get it: when I use the camera with an intent and also specify an output file, the returned image is always very small on many devices (e.g. Motorola Milestone 2.1, HTC Desire 2.1, Emulator 2.1, Emulator 2.0.1) but not on all (e.g. Nexus One). Here's what I do to bring up the camera app:
private final static St...
My goal is to set the users notification sound from a file that is stored onto the SD card from with in the application. I am using this code:
if(path != null){
File k = new File(path, "moment.mp3");
ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath());
values.put(Me...
I'm using the MediaStore to share a dynamically generated image using ACTION_SEND.
The code is the following:
String urlString = MediaStore.Images.Media.insertImage(getContentResolver(), path, name, name);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("image/jpeg");
intent.putExtra(Intent.EXTRA_STRE...
This started out as a general user question on Android forums. However it's become, by necessity, a programming question. Here's my problem.
Android has a service - MediaScanner - which runs in the background any time (I believe) the SD card is un-mounted and re-mounted. This service collects data on all the media files on the card, a...
I just load thumbnails(MINI_KIND) into GridView to show overview of local images of Camera.Click on it to show a bigger thumb(MICRO_KIND).And now I need to get the original image through MediaStore.Images.Thumbnails.IMAGE_ID(to upload the original file).Should I query again through MediaStore?
like photoshop.com for android
...
I have an onActivityResult returning from an mediastore image selection which I can get a URI for an image using the following:
Uri selectedImage = data.getData();
Converting this to a string gives this:
content://media/external/images/media/47
Or to a path gives:
/external/images/media/47
However I can't seem to find a wa...
Hi,
I'm using MediaStore.Images.Thumbnails in order to show the images the user have. But i'm not able to get an image through its path.
Is there any way to look for an image using the path?
String [] proj={MediaStore.Images.Thumbnails._ID, MediaStore.Images.Thumbnails.IMAGE_ID, MediaStore.Images.Media.DATA};
String selection = Media...
Hi, I am trying to find the sqlite database used by the MediaStore. As far as I understand, the MediaStore contains amongst others the playlists defined in the default Music app. I actually would like to duplicate a playlist, but the app does not allow that. Somehow I thought I could fix this if I just could find the actual db file. But ...
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: [...
I'm using the MediaStore.Video.Thumbnails.getThumbnail() method to
fetch thumbnails for files that I am displaying in a list. This works
well to begin with, but after a while the thumbnails that I get back
are not the ones that match the file. Once GetThumbnail() starts
failing it seems to return only the same Bitmap over and over agai...
Based on the results of my query in this thread, I've decided that I need to maintain my own database of metadata for the media that I'll be accessing. It seems like MediaStore is a very good start for this, as it will give me a good deal of information and is regularly updated by the MediaScanner. In an ideal world, I would add a few co...
I'm now using this method: MediaStore.Images.Media.insertImage. There are two choices:
final static StringinsertImage(ContentResolver cr, String imagePath, String name, String description)
Insert an image and create a thumbnail for it.
final static StringinsertImage(ContentResolver cr, Bitmap source, String title, String description)
In...