Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为同步定义的 ContentProvided 是 dummy(按照这种方法)。
如果 API > 8,(95% 的设备)使用ContentResolver.addPeriodicSync()
ContentResolver.addPeriodicSync()
如果 API = 7,(截至 2102 年 3 月,5.5% 的设备)创建一个具有周期性计时器回调的服务,并调用ContentResolver.requestSync().
ContentResolver.requestSync()
API < 6 不支持 syncAdapter,所以不用担心。