I am using the following code to get Authsubtoken from my android application; following is the code:
GoogleAuthUtil.getToken(myCtx, "[email protected]","oauth2:https://www.googleapis.com/auth/userinfo.profile")
With this code, I get the following exception:
com.google.android.gms.auth.UserRecoverableAuthException: NeedPermission
How to overcome this exception?
Any help is appreciated.
Using this exception
...
} catch (UserRecoverableAuthIOException e) {
startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);
}
...
check out more here