本文介绍了Syncadapter最后更新日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得同步适配器服务的最后更新日期(用红色标出)?

How can obtain the last update date from the sync adapters services (marked with red) ?

推荐答案

有趣。该API将(几乎都可以)在 android.content.ContentResolver 因为这是在那里定期同步和启用/禁用的同步管理。有没有API那里提出要求。

Interesting. The API would (almost have to be) on android.content.ContentResolver as that's where periodic sync and enable/disable sync is managed. There's no API there to request it.

您试图找到自己的SyncAdapter或为第三方应用这个值?

Are you trying to find this value for your own SyncAdapter or for a third party app?

通过自己SyncAdapter,你明明可以只存储日期()到您的ContentProvider内的单行SQLite表,要么从SyncAdapter或应用程序引用它。

With your own SyncAdapter, you obviously can just store date() into a single-row sqlite table within your ContentProvider and reference it either from the SyncAdapter or the app.

有关第三方应用程序,这些信息......也许不是avaliable?

For a third party app, that information... might not be avaliable?

这篇关于Syncadapter最后更新日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-11 20:42