Contacts provider not appears in “google contacts application”

时光毁灭记忆、已成空白 提交于 2020-01-17 06:41:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!