问题
I wrote a Contacts provider. It is quite configurable via "Settings/Accounts", it correctly sync contacts from remote server and these contacts are visible in the "Google contacts" application.
But in the setting "Contacts to display" of the "Google Contacts application" I can't see my provider (but I see others, like skype).
Platform: Android >= 5.0
Any idea? TIA Roberto C.
回答1:
I assume you've created an xml file for you SyncProvider, that xml file has a field userVisible
, make sure it's true
:
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter
xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="com.example.my_sync_provider"
android:accountType="com.example.my_type"
android:userVisible="true"
android:supportsUploading="true"
android:allowParallelSyncs="true"
android:isAlwaysSyncable="true" />
read more here: https://developer.android.com/training/sync-adapters/creating-sync-adapter.html and also this is a must read: http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/ (part 2 as well)
回答2:
thanks. I have this attribute. I discovered that the problem was generated by a doubled calendar-related xml which refer an undefined account type
来源:https://stackoverflow.com/questions/44565619/contacts-provider-not-appears-in-google-contacts-application