我正在查看 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/