Google Login
I haven't manage to sign in with google account could someone send some example code
OkHttpClient http = new OkHttpClient();
RequestEnvelopeOuterClass.RequestEnvelope.AuthInfo auth = auth = new GoogleLogin(http).login("", "");
PokemonGo go = new PokemonGo(auth, http);
first line in console will be something like this
D/GoogleLogin: Get user to go to:https://www.google.com/device and enter code:XXXX-XXXX
Just open the link and enter the code for the account you want to use
is there any way to do this programatically ?
U can open a webpage/webview with the link and have the code copied to the clipboard.
i can use google login sign button ?
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); startActivityForResult(signInIntent, RC_SIGN_IN);
using id token ? i tried it but give login failed.
How
can I use Android's native Google sign in with this libary?
You can't. The Google Indentity Platform uses the SHA1 fingerprint and package name to authenticate the caller of all sign in requests. This means that Niantic would need to add your app's SHA1 fingerprint and package name to their Google API Console. If you ever requested a Google Maps API key, you went through the same process. An alternative would be using a WebView to access the web based OAuth flow. This will work with the client ID and secret provided by this library.
You will have to stick to using a web oauth flow and passing the access token, or using the google login and getting the url and code with listeners.