Ответ 1
Вам просто нужно определить несколько адаптеров синхронизации, используя тот же тип учетной записи.
манифест содержит:
<service android:exported="true" android:name="com.example.FooSyncAdapterService">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter_foo" />
</service>
<service android:exported="true" android:name="com.example.BarSyncAdapterService">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter_bar" />
</service>
И syncdataper_foo
есть
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="foo"
android:accountType="com.example"
android:allowParallelSyncs="true" />
И syncdataper_bar
есть
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="bar"
android:accountType="com.example"
android:allowParallelSyncs="true" />
Обратите внимание, что в случае типа учетной записи "com.google" адаптеры синхронизации предоставляются даже различными приложениями ( "Диск", "Документы", "Листы", "Gmail", "Календарь" и т.д.).