首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

依据电话号码查找人名

2012-08-21 
根据电话号码查找人名// Android 1.6 and earlier (backwards compatible for Android 2.0+) Uri uri Ur

根据电话号码查找人名

// Android 1.6 and earlier (backwards compatible for Android 2.0+) Uri uri = Uri.withAppendedPath(Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(phoneNumber));  // Android 2.0 and later Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));  // Query the filter URI String[] projection = new String[]{ PhoneLookup.DISPLAY_NAME, ... Cursor cursor = context.getContentResolver().resolver.query(uri, projection, ... 

?

热点排行