Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.provider.MediaStore; public class Main { private static String getImageAbsolutePath0(Activity act, Uri uri) { // can post image String[] proj = { MediaStore.Images.Media.DATA }; Cursor cursor = act.managedQuery(uri, proj, null, null, null); int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); return cursor.getString(column_index); } }