i have here a code snippet that saves a bitmap on sd card:
String filename = String.valueOf(System.currentTimeMillis()) ;
ContentValues values = new ContentValues();
values.put(Images.Media.TITLE, filename);
values.put(Images.Media.DATE_ADDED, System.currentTimeMillis());
values.put(Images.Media.MIME_TYPE, "image/jpeg");
Uri uri = getContentResolver().insert(Images.Media.EXTERNAL_CONTENT_URI, values);
try {
OutputStream outStream = getContentResolver().openOutputStream(uri);
bm.compress(Bitmap.CompressFormat.JPEG, 90, outStream);
outStream.flush();
outStream.close();
the default storage is the "Camera" folder in the gallery.
my question is:
using the code above, can i save my images to a different folder on my sd card?