标签:android http color io java sp on 问题 cti
============问题描述============
private void getContactPeople(String incomingNumber)
{
myTextView1.setTextColor(Color.BLUE);
ContentResolver contentResolver = getContentResolver();
Cursor cursor = null;
String[] projection = new String[]
{
ContactsContract.Contacts._ID,
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.CommonDataKinds.Phone.NUMBER
};
cursor = contentResolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, projection,
ContactsContract.CommonDataKinds.Phone.NUMBER + "=?", new String[]
{ incomingNumber }, "");
if(cursor.getCount() == 0)
{
myTextView1.setText("unknown Number:" + incomingNumber);
}
else if (cursor.getCount() > 0)
{
cursor.moveToFirst();
String name = cursor.getString(1);
myTextView1.setText(name + ":" + incomingNumber);
}
}============解决方案1============
请教一下大牛!有关于android 通过电话号码查询通讯录的问题。
标签:android http color io java sp on 问题 cti
原文地址:http://www.cnblogs.com/lianxu61/p/4047441.html