开发者

How synchronization with SyncAdapter works on android?

If I need to start synchronization adhoc, I use requestSync. 开发者_如何学运维But looks like it doesn't work when setIsSyncable defined as false. How to initiate synchronization by user request in this case?

Moreover, if after that I define setIsSyncable as true and also start period syncs with addPeriodicSync, synchronization starts 2 times.


1: To override setIsSyncable:

Add ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS set to true in the requestSync() extras Bundle.

2: Double-sync

(see comment first)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜