HI all,
I am facing a issue regarding the camera i.e., i captured the
image from camera now i ll take the image path and converted to bitmap
format and then pushed to some array list. now i want to delete the
image from the gallery. i used these concept
Bitmap bmp = null;
String[] projection = { MediaStore.Images.ImageColumns.SIZE,
MediaStore.Images.ImageColumns.DISPLAY_NAME,
MediaStore.Images.ImageColumns.DATA,
BaseColumns._ID, };
Cursor c = null;
Uri u = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
try {
if (u != null) {
c = managedQuery(u, projection, null, null,
null);
}
if ((c != null) && (c.moveToLast())) {
bmp = getBitMap(c.getString(2), 3);
ContentResolver cr = getContentResolver();
cr.delete(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
BaseColumns._ID + "=" +
c.getString(3), null);
}
} catch (Exception e) {
e.printStackTrace();
//bmp = null;
}
finally {
if (c != null) {
c.close();
}
}
but the problem is sometimes i am getting another images path which is
in gallery folder. how to solve these problem.
Thanks and Regards,
S.Seshu
--
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