android - Get all Contacts (Both from Phone and sim ) in a listview -


i new developer . making app in want contacts in listview . contact name main item , number subitem . can't contact ( both phone , sim ) .

how contacts ?? how set name main item , number subitem ??

please . in advance .

you need query contactscontract database using contentresolver. can use simplecursoradapter link list view. there quite few examples of how on web if search around, e.g.:

http://learnandroideasily.blogspot.co.uk/2013/03/how-to-access-contacts-in-android.html

make sure read bit on how contacts stored on android complicated 3-tier system:

http://developer.android.com/reference/android/provider/contactscontract.html


Comments