URL(Uniform Resource Locator):统一资源定位符 URI(Uniform Resource Identifier):统一资源标识符
Intent intent=getIntent(); Uri uri=intent.getData(); String data=uri.toString(); String RealPath=""; if(ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) { Cursor cursor = this.getContentResolver().query(uri, new String[]{MediaStore.Images.ImageColumns.DATA}, null, null, null); if (null != cursor) { if (cursor.moveToFirst()) { int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); if (index > -1) RealPath = cursor.getString(index); } cursor.close(); } } Log.d("Debug",RealPath);