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.
认证班有以下方法:
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;
}
但是,我无法在我的会计行为中调用摘要AccountAuthenticator的Ausentication等级。 而且,我不敢肯定,这是否会给我带来巨大帮助。 我不清楚这一方法是什么。
谁能打下某种灯?
谢谢大家。