开发者

How to get a name of captured image in Android

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. s开发者_如何转开发uch 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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜