实例:通过uri 查询 MediaStore.MediaColumns.DATA字段:
Cursor c = context.getContentResolver().query(uri, new String[] {MediaStore.MediaColumns.DATA}, null, null, null);
if (c != null) {
try {
int numrows = c.getCount();
if (numrows == 1) {
c.moveToFirst();
oldPath = c.getString(0);
Log.i(TAG, "oldPath = '" + oldPath + "'");
} else {
Log.e(TAG, "" + numrows + " rows for " + uri);
}
} finally {
c.close();
}
}