我正在为应该将电视广播信息同步到设备的 android 设备编写自己的 SyncAdapter,但遇到了在帐户首选项的数据和同步部分下没有显示同步“mydata”复选框的问题。
我已经实现了自己的 SyncAdapter 并在 xml 中正确定义了它:
这是我的sync.xml:
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="com.example.tv.programs"
android:accountType="com.example.tv.sync"
android:supportsUploading="false"
android:userVisible="true"
/>
android manifest 的相应部分,我在其中定义了我的同步服务和提供者:
<service android:name=".sync.ProgramSynchronizationService" android:exported="true" android:process=":programs">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/sync" />
</service>
<provider android:name="com.example.tv.providers.ProgramContentProvider"
android:authorities="com.example.tv.programs" />
我做错了什么,因为我在数据和同步部分看不到任何东西吗?