0

after capture the image in android how to get a name that save in SD card to programme? or how to set a name for capturing image to save in SD card. such as using incremental number. pls give me some sample code

Miuranga
  • 2,463
  • 10
  • 51
  • 81
  • what is the reason for vote down. ? if you vote down this give reasonable fact for it. because I want to know how to do that – Miuranga Aug 23 '11 at 04:01

1 Answers1

0

I found answer from here.

using this method

public String getRealPathFromURI(Uri contentUri) {
    String[] proj = { MediaStore.Images.Media.DATA };
    Cursor cursor = managedQuery(contentUri, proj, null, null, null);
    int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
    cursor.moveToFirst();
    return cursor.getString(column_index);
}
Community
  • 1
  • 1
Miuranga
  • 2,463
  • 10
  • 51
  • 81