If your photo data is a Bitmap, you can use the following code segment
to insert the photo and it should appear in the Gallery.
String uriString =
MediaStore.Images.Media.insertImage(getContentResolver(),
photo_bitmap, "title", "description");
Uri uri = Uri.parse(uriString);
--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.
On Jul 2, 7:44 pm, Jonathan Daugherty <[email protected]> wrote:
> Hi all,
>
> I'm working on a program that acquires camera captures and I'd like
> them to appear in the Gallery. I'm storing them on the SD card
> alongside pictures stored by the native camera application and I've
> verified with "adb shell" that the images are physically present, but
> when I open the Gallery I don't see the ones I've captured with my own
> application. Any thoughts? The storage URI I'm using to store the
> images is:
>
> android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI
>
> I use this code to insert into the ContentProvider:
>
> ContentValues values = new ContentValues();
> values.put(Media.TITLE, filename);
> values.put(Media.DESCRIPTION, "Image capture by camera");
> Uri uri = getContentResolver().insert(EXTERNAL_CONTENT_URI, values);
>
> And later I open an OutputStream to that URI and save the photo data.
>
> Thanks!
>
> --
> Jonathan Daugherty
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---