3

I am new to android programming, so excuse me if this is a simple question. How can I get the total number of contacts from the address book?

user1357350
  • 777
  • 1
  • 7
  • 12

1 Answers1

0

For Total Count of Contact use below code.

Cursor cursor =  managedQuery(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, null);

int count = cursor.getCount();
Herry
  • 7,037
  • 7
  • 50
  • 80