Question

I was looking at the code for JumpNotes and there was one thing I just could not figure out. JumpNotes: AccountList.java

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

This is used to get google accounts like so:

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

What is this feature "service_ah"? What does it mean? Is there any way I can get the source for the authenticator service for google accounts on Android?

Was it helpful?

Solution

From Android Documentation:

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.

I didn't found any official documentation, but it seems that each feature is of the form service_code where code stands for a Google service.

From this (outdated) list of services, "ah" stands apparently for "Google Mashups Editor & Google App Engine"

OTHER TIPS

This python Google account authentication example is not really helpful for you,but we can learn two things as below:

First, the connection on a google account is handled by GAE in two steps.

> This takes two calls, one to the ClientLogin service of Google Accounts, and then a second to the login frontend of App Engine.

Second, We can find on line 101 the token "_ah", which means in this case that we enable cookies for automatic auth with the service next time he wants to auth (user data are stored into cookies to skip the first auth call).

So in your case "service_ah" means that you want the user to authenticate one time and then the authentication process should be automatically handled by the AccountManager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top