如何界定SyncAdapter更新频率在Android? [英] How to define frequency of SyncAdapter updates on android?

查看:188
本文介绍了如何界定SyncAdapter更新频率在Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有同步ContentProvided定义是虚设(按照<一href=\"http://stackoverflow.com/questions/4649808/syncadapter-without-a-contentprovider/4650589#4650589\">this方法)。

ContentProvided defined for synchronization is dummy (in accordance with this approach).

推荐答案

如果API> 8,(设备的95%)使用 ContentResolver.addPeriodicSync()

If API > 8, (95% of devices) use ContentResolver.addPeriodicSync()

如果API = 7,(设备的5.5%,为2102年3月)的创建周期计时器回调服务,并调用 ContentResolver.requestSync()

If API = 7, (5.5% of devices as of Mar 2102) create a service with a periodic timer callback, and call ContentResolver.requestSync().

&API LT; 6不支持syncAdapter,所以不用担心。

API < 6 does not support syncAdapter, so no worries.

这篇关于如何界定SyncAdapter更新频率在Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆