我正在尝试通过他们的contactId查找联系人的电话号码,bll结果正在返回 - 电话号码:1
我尝试过使用 SO 周围的其他示例,但我一直在光标上获得 0 计数
Uri uri = ContentUris.withAppendedId(Data.CONTENT_URI, contactId);
Log.i(TAG, "Locate Contact by Id: " + contactId + " at Uri: " + uri.toString());
Cursor cursor = this.getContentResolver().query(uri, null, null, null, null);
try {
if (cursor.moveToFirst()) {
Log.i(TAG, "Phone Number: " + cursor.getString(cursor.getColumnIndex(Phone.NUMBER)));
}
} finally {
cursor.close();
}