Hi!
I'm trying for my app to create a picture this way:
ContentValues contentValues = new ContentValues(3);
contentValues.put(MediaColumns.DISPLAY_NAME, name);
contentValues.put(ImageColumns.DESCRIPTION, desc);
contentValues.put(MediaColumns.MIME_TYPE, "image/jpeg");
Uri uri = getContentResolver().insert
(Media.EXTERNAL_CONTENT_URI, contentValues);
outputStream = getContentResolver().openOutputStream(uri);
/* write to outputStream then close it */
It works fine, except when doing this, the picture is written in the
"Camera" folder (/sdcard/dcim/Camera).
Since the picture was not taken with the camera, this is not
desirable.
Is there any way to put it directly in dcim?
Actually, I also tried to create my file directly (not using the
content provider, but creating manually the file in /sdcard/dcim). The
problem is doing this way, the Pictures app doesn't seem to see my
image until I reboot the phone. Maybe there's a way to notify the
Pictures app so it rescans the pictures?
Thanks a lot for your help.
BoD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---