I have this code (found on this site, somewhere):
public static List<MyImages> getImages(Activity context) {
List<MyImages> lst = new ArrayList<MyImages>();
Cursor cursor = getCameraThumbImages(context);
if (cursor != null) {
int columnIndex = cursor
.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID);
int columnIndexPath = cursor
.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.DATA);
int columnIndexImagePath = cursor
.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.IMAGE_ID);
int count = cursor.getCount();
for (int i = 0; i < count; i++) {
cursor.moveToPosition(i);
int imageID = cursor.getInt(columnIndex);
String path = cursor.getString(columnIndexPath);
Uri imgThmbPath = Uri.withAppendedPath(
MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, ""
+ imageID);
String hope = cursor.getString(columnIndexImagePath);
MyImages p2p = new MyImages(path, "" + imageID);
lst.add(p2p);
}
}
return lst;
}
This code allow me to access the thumbnails of the images on my phone. The issue is that I don't see how to get the original image path from this.
The question is: given the thumbnail (or the cursor), how do i get the original image path?