I have a custom List view and i need to display the contacts in Alphabetical order can u provide the sample code how can i achieve this?
you can get contacts in alphabatical order like this:
Cursor cursor = getContentResolver.query(Phone.CONTENT_URI, null, null, null, Phone.DISPLAY_NAME + " ASC");
refer these links for more cearity:
How to call Android contacts list?
How to get contacts from native phonebook in android
How to obtain all details of a contact in Android
How to get the first name and last name from Android contacts?
How to import contacts from phonebook to our application
Android contacts extraction
How to get all android contacts but without those which are on SIM
For list you can refer this tutorial:
http://www.vogella.de/articles/AndroidListView/article.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With