문제

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

도움이 되었습니까?

해결책

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);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top