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?
Asked
Active
Viewed 8,321 times
1 Answers
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