List of utility methods to do Contact Get
String | getOperatorByNumber( 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()) { ... |
String | getEmail(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 ... |