Question

I am trying to write an Android SyncAdapter and am a little confused. During a sync (i.e. in onPerformSync() ), I want to be able to pull data down from a remote server but also push data up to a remote server (is that a 2-way sync? or is a 2-way sync when the server also initiates a sync?).

Anyway, I am guessing I need to set android:supportsUploading="true" in the manifest file. However, from my understanding, the documentation says that this is for uploads only. Is it not possible to do both uploading and downloading in a sync operation with a SyncAdapter?.

Thanks.

Edit: It looks like the Sample SyncAdapter has two way syncing (although I am not 100% sure) - but only from API 11+. I want to support earlier API levels - is this not possible?.

Was it helpful?

Solution

I dont know, what protocol you are using to send or receive data, but if you are using http you can easily do both by using a HTTP Get-Request for receiving data and a POST or PUT Request to send data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top