Android application for contacting contacts / phone book programmatically

I am currently writing an application that allows you to expand standard Android contacts / phonebook. The user can add some information / content related to a specific contact. I want the standard phone book to have a link to my application for each contact that has additional data. For example, WhatsApp can do this. If someone in your phone book has a WhatsApp account, a small WhatsApp icon is displayed in the phone book next to the contact. If you click on the icon, WhatsApp will automatically start a chat with this particular person.

My question is now, how can this be achieved? If someone can point me in the right direction, that would be great.

I think this should be somehow done with ContentProvider. I have already indicated ContentProviderbut I don’t know how to tell the Contacts application that it exists or where I need to register this provider.

+5
source share
1 answer

Please find before asking a new question. Googling will provide a huge set of answers for him.

You need to use a contact provider . The class ContactsContract.Contactsprovides access to all contacts available on an Android mobile device.

.

<uses-permission android:name="android.permission.READ_CONTACTS" />

Android. http://developer.android.com/training/contacts-provider/index.html

http://developer.android.com/shareables/training/ContactsList.zip

+1

Source: https://habr.com/ru/post/1570270/


All Articles