有的时候android要将android uri如content://media/external/image/media/102这样格式转换
成File类型或者获取真实文件路径,可以用以下方法:iphone5
Uri uri = data.getData();
String[] proj = { MediaStore.Images.Media.DATA };
Cursor actualimagecursor = managedQuery(uri,proj,null,null,null);
int actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
actualimagecursor.moveToFirst();
String img_path = actualimagecursor.getString(actual_image_column_index);
File file = new File(img_path);