How to enable sync without syncing every few seconds

前端 未结 1 1804
悲&欢浪女
悲&欢浪女 2021-01-06 14:36

I have used Google\'s Android developer documentation (http://developer.android.com/training/sync-adapters) to create a syncing system.

My app now has an entry in An

相关标签:
1条回答
  • 2021-01-06 15:06

    You should add ContentResolver.setMasterSyncAutomatically(true); to your code. Without this the setSyncAutomatically will be ignored.

    Read the documentation [here] (http://developer.android.com/reference/android/content/ContentResolver.html#setMasterSyncAutomatically(boolean))

    0 讨论(0)
提交回复
热议问题