Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syncing multiple providers with one SyncAdapter

I want to sync com.android.contacts and com.android.calendar with one SyncAdapter. Is this possible?

If yes, how I have to edit following lines?

<sync-adapter
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:contentAuthority="com.android.contacts"
    android:accountType="com.package.account"
    android:supportsUploading="false"
    android:userVisible="true" />
like image 770
endian Avatar asked Oct 05 '22 04:10

endian


1 Answers

Appearently not:

"Each SyncAdapter spins up a SyncThread that is bound to the authority defined in sync-adapter.xml, and multiple authorities cannot be defined in this xml file..."

(kianatennyson)

How to use one SyncAdapter-class for multiple authorities?

like image 112
Phil Avatar answered Oct 10 '22 02:10

Phil