android - 谷歌帐户所需的同步功能

标签 android android-syncadapter google-authentication google-account

我正在查看 JumpNotes 的代码,有一件事我就是想不通。 JumpNotes: AccountList.java

public static final String[] GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES =
        new String[]{ "service_ah" };

这用于获取谷歌帐户,如下所示:

mAccountManager.getAccountsByTypeAndFeatures(SyncAdapter.GOOGLE_ACCOUNT_TYPE,
            SyncAdapter.GOOGLE_ACCOUNT_REQUIRED_SYNCABILITY_FEATURES,

这个功能“service_ah”是什么?这是什么意思? 有什么方法可以获取 Android 上谷歌帐户的身份验证器服务的源代码?

最佳答案

来自 Android 文档:

Account features are authenticator-specific string tokens identifying boolean account properties. For example, features are used to tell whether Google accounts have a particular service (such as Google Calendar or Google Talk) enabled. The feature names and their meanings are published somewhere associated with the authenticator in question.

我没有找到任何官方文档,但似乎每个功能的形式都是 service_code,其中代码代表 Google 服务。

来自这个(过时的)list of services ,“啊”显然代表“Google Mashups Editor & Google App Engine”

关于android - 谷歌帐户所需的同步功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8153715/

相关文章:

android - 如何让 TalkBack 自动读出 TextView 的错误信息?

java - 如何使用自己的标记 Android 制作 `Cluster`

android - 如何在 SyncAdapter 完成时通知调用 Activity?

java - 如何通过后端服务器进行身份验证?

java - 如何在每个 ActionBar 选项卡中使用不同的布局 (Android)

android - 使用 overridePendingTransition 导致列表适配器中出现 classcastexception

android - 当 SyncAdapter 在 android 上运行同步?

android - 当应用程序中为 false 时,如何默认启用同步选项?

android - 如何退出谷歌认证?

ios - Google 登录向导不要求添加新帐户或选择现有帐户 - iOS