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?.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With