Home Ask Login Register

Developers Planet

Your answer is one click away!

NeoDemocrito February 2016

How to find out programmatically if a contact is editable in android

In the application I am building I am accessing the contacts of the mobile, but I need to know whether those contacts are editable (like the ones of the google account) or not (like the ones coming from Skype). I haven't found anything related to this topic anywhere, but I see that the contacts application from Samsung is able to distinguish between them, so it has to be possible. Any help or guide would be very appreciated. Thanks a lot!!

Well, it seems that maybe what I am asking is not completely clear. This is my specific use case: I am building an app that has a map. From it you can access the contact list and when you select a contact, this will be shown in a balloon on the map. If that contact is writeable, you will have a button in that bubble to edit that contact. But if that contact is not writeable, that button will not appear.


Karthik Kumar February 2016

You need to have following permissions which will enable write/read authority on contacts. When you have write permission, it implicitly means that you have edit permission on contacts.

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

For complete list of available permissions, please go through developer reference

To edit contacts please refer the this discussion.

For sample code please go through this and this.

Post Status

Asked in February 2016
Viewed 2,448 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life