take picture using standard image_capture intent

All your problems with Audio, Video and Images.

take picture using standard image_capture intent

Postby android88 » Tue Mar 02, 2010 1:19 pm

Hi guys, I just found out that there is a standard camera intent and I want to use it to take a picture in my application. I searched this forum, but it seems that everyone is creating their own camera intent. Hopefully someone knows how to use the standard one. I'm calling the picture taking intent like this:

Code: Select all
Intent intent2= new Intent("android.media.action.IMAGE_CAPTURE");
uri = Uri.fromFile(new File("TempPicture"));

And in the onActivityresult:
Code: Select all
Bitmap leftImage = (Bitmap)data.getExtras().get("data");

But the image doesn't get the filename I specify (TempPicture), but just a numbered filename (e.g. "IMAG0119"). Does anyone know how to get it to make the file with my own filename? The reason I want to know this is because I don't actually want to save the image on the phone, I just want to read it in an other part of my application and then delete it. But for deleting it I need the filename.
Junior Developer
Junior Developer
Posts: 13
Joined: Tue Jan 05, 2010 9:06 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 20 guests