Android Utililty Methods Contact Get

List of utility methods to do Contact Get

Description

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

Method

StringgetOperatorByNumber( ContentResolver contentResolver, String number)
get Operator By Number
Uri uri = Uri.withAppendedPath(
        ContactsContract.PhoneLookup.CONTENT_FILTER_URI,
        Uri.encode(number));
Cursor contactLookup = contentResolver.query(uri,
        new String[] { PhoneLookup.LABEL }, null, null, null);
try {
    if (contactLookup != null && contactLookup.getCount() > 0) {
        while (contactLookup.moveToNext()) {
...
StringgetEmail(int contactId)
This method used to get mail id from contact id.
String emailStr = "";
final String[] projection = new String[] { Email.DATA, 
        Email.TYPE };
final Cursor email = mSmartAndroidActivity.managedQuery(
        Email.CONTENT_URI, projection, Data.CONTACT_ID + "=?",
        new String[] { String.valueOf(contactId) }, null);
if (email.moveToFirst()) {
    final int contactEmailColumnIndex = email
...