I am not a programmer, but I need to do this myself. I need some help.
I have been looking for the solution for the last two days and I cannot find any.
Ok. I am writing Android Native App. My first goal is to achieve possibility of login through Google Account (which is already set on the phone).
So I am using AccountManager to get the "com.google" account, I am getting an auth token this way:
Account[] mAccounts = mAccountManager.getAccountsByType("com.google");
AccountManagerFuture<Bundle> response =
mAccountManager.getAuthToken(mAccounts[0], "android", null, this, null, null);
Bundle authTokenBundle;
String authToken;
try {
authTokenBundle = response.getResult();
authToken = authTokenBundle.getString(AccountManager.KEY_AUTHTOKEN).toString();
} catch (OperationCanceledException e) {
Log.e(TAG, e.getMessage());
} catch (AuthenticatorException e) {
Log.e(TAG, e.getMessage());
} catch (IOException e) {
Log.e(TAG, e.getMessage());
}
And my question is - what should be my next step? How I can go further with this authentication process? How should I use this token?
I have found some resources, but most of them are using OAuth or are web-based. I only need to authenticate and (if it is possible) get the name of the user (I already have the e-mail address), I don't need to access any Google services.
Thank You in advance.