Android Utililty Methods Contact Search

List of utility methods to do Contact Search

Description

The list of methods to do Contact Search are organized into topic(s).

Method

booleanisContactNameByNumberExist(Context context, String number)
judge qrcodecontacts exist by name
Uri uri = Uri
        .parse("content://com.android.contacts/data/phones/filter/"
                + number);
ContentResolver resolver = context.getContentResolver();
Cursor cursor = resolver.query(uri,
        new String[] { "display_name" }, null, null, null);
return cursor.moveToFirst();
StringprocessContactsResult(Activity activity, Intent intent)
process Contacts Result
String result = null;
Uri contactData = intent.getData();
Cursor c = activity.managedQuery(contactData, null, null, null,
        null);
if (c.moveToFirst())
    result = c.getString(c.getColumnIndexOrThrow(People.NUMBER));
c.close();
return result;
...