I'm working on a Welcome app for a new firmware. This app will run right after a factory reset. I would like to know if there's a way to create a google account (if the new user doesn't have one already) for contacts and callendar sync. I've got the SimpleSyncAdapter sample and I'm having a hard time figure out how to use that with a custom activity form that will be one step of the tutorial/welcome app. In the google sample the AuthenticatorActivity starts an AuthenticationService that instantiates the Authentication class.
The Authentication class has the following method:
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType,
String authTokenType, String[] requiredFeatures, Bundle options) {
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
intent.putExtra(AuthenticatorActivity.PARAM_AUTHTOKEN_TYPE, authTokenType);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
final Bundle bundle = new Bundle();
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
return bundle;
}
But I'm not able to instantiate the Authentication class that extends AbstractAccountAuthenticator in my AccountActivity. Also, I'm not sure if this will rly help me. It's not clear to me what this method does.
Can anyone shed some light?
Thank you all!
Have a look at this webpage: http://www.google.com/support/forum/p/apps-apis/thread?tid=0fc7c28920b60576&hl=en