4

Can someone tell me how to make a contact on a android phone 'non editable', I've seen it done with Facebook contacts but i dont know how to do it my self. Is there a value i have to put with a contact when inserting it into the contacts database? Or a option within the AccountManager?

Thanks in advance... :)

[Edit] I've found out that the SYnc Provider has to be 'read-only'. Anyone know how to do this?

1 Answer 1

7
+50

In your sync adapter's xml file (e.g. syncadapter.xml), define android:supportsUploading="false". This will make the sync adapter "read-only" (i.e. the phone won't be able to upload changes), which is what you are looking for.

3
  • Aha.. Works perfectly, thankyou.. Do you know how to set the display option for a new account when its created?
    – Tom O
    Jul 4, 2011 at 9:09
  • 1
    Not sure if I understand what you mean. Consider creating a separate question for that, I'm not sure if I'll be able to answer it anyway :)
    – Håvard
    Jul 4, 2011 at 15:41
  • 1
    Setting android:supportsUploading="false" is not working for me for some reason. Other settings in syncadapter.xml are working though, such as android:userVisible="false" which does correctly remove the sync toggle from the account settings UI. Is there some other setting that I am missing?
    – amb
    Jan 10, 2014 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.