Skip to main content

Posts

Showing posts with the label android-cursor

Fetching a large number of contacts

I'm trying to fetch all the Phone numbers and Emails in Android.by using this code. enter code here String KEY_NAME = "Name"; String KEY_NO = "No"; String selection = ContactsContract.CommonDataKinds.Phone.IN_VISIBLE_GROUP + " = 1"; String sortOrder = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE LOCALIZED ASC"; String data=""; String name=""; ContactEntry contactObj; String id; List<String> temp = new ArrayList<String>(); final String[] projection = new String[]{ContactsContract.Contacts._ID , ContactsContract.Contacts.DISPLAY_NAME , ContactsContract.Contacts.HAS_PHONE_NUMBER}; final String[] email_projection = new String[] {ContactsContract.CommonDataKinds.Email.DATA , ContactsContract.CommonDataKinds.Email.TYPE}; final String[] phone_projection = new String[] {ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.

Fetching a large number of contacts

I'm trying to fetch all the Phone numbers and Emails in Android.by using this code. enter code here String KEY_NAME = "Name"; String KEY_NO = "No"; String selection = ContactsContract.CommonDataKinds.Phone.IN_VISIBLE_GROUP + " = 1"; String sortOrder = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE LOCALIZED ASC"; String data=""; String name=""; ContactEntry contactObj; String id; List<String> temp = new ArrayList<String>(); final String[] projection = new String[]{ContactsContract.Contacts._ID , ContactsContract.Contacts.DISPLAY_NAME , ContactsContract.Contacts.HAS_PHONE_NUMBER}; final String[] email_projection = new String[] {ContactsContract.CommonDataKinds.Email.DATA , ContactsContract.CommonDataKinds.Email.TYPE}; final String[] phone_projection = new String[] {ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.