List of utility methods to do URI to Path Convert
String | getRealPathFromURI(Activity activity, Uri contentUri) Get the real file path from URI registered in media store String[] proj = { MediaStore.Images.Media.DATA }; String strFileName = ""; Cursor cursor = activity.managedQuery(contentUri, proj, null, null, null); if (cursor != null) { int column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); activity.startManagingCursor(cursor); ... |
String | getRealPathFromURI(Activity activity, Uri contentUri) get Real Path From URI String[] proj = { MediaStore.Images.Media.DATA }; Cursor cursor = activity.managedQuery(contentUri, proj, null, null, null); int column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); if (cursor.moveToFirst()) { return cursor.getString(column_index); } else { ... |