这也是Uri?还是什么?使用contentResolver()查询不到目标信息啊?
不懂。。。。
还有想知道调用相机时不放extra参数,图片会在返回的intent中的一个名为data的extra中。这个data的名字是哪里查来的?我在android官方api中没找到啊?求指教。。。。
只需替换file头即能获取绝对路径
本地的文件是file开头的
if (data != null && data.getData() != null) {
Uri uriRecorder = data.getData();
Cursor cursor = this.getContentResolver().query(uriRecorder, null, null, null, null);
if (cursor.moveToNext()) {
String strRecorderPath = cursor.getString(cursor.getColumnIndex("_data"));
}