zum Beispielkonvertiert Realpfadformat zu Uri in android
realer Weg ist mnt/sdcard/image_1.jpg Uri Pfad ist Inhalt: // media/extern/images/media/140 ähnliche
Uri photoUri =Uri.parse("content://media/external/images/media/140");
Log.d("selectedphoto",""+photoUri);
selectedImagePath = getPath(photoUri);
public String getPath(Uri uri) {
String[] projection = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(uri, projection, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
}
In obigem Code konvertiere ich Uri auf realem Weg aber dnt wissen, wie man Uri realen Weg
es Ihnen helfen http://stackoverflow.com/a/11603841/336990 – CoDe