Skip to content Skip to sidebar Skip to footer

Android : Google Sign In GoogleApiClient.connect()

the following code is copied from www.developers.google.com i want to implement Google Sign In functionality, but unable to do so. when i click on SignIn Button it asks for permiss

Solution 1:

For Google Sign-in you might want to try starting from the Android Sign-in Quickstart and then integrating from there. If you're using Play Games Services, BaseGamesUtils can be helpful but is not required.

Next, unless you are updating / migrating a legacy Play Games Services project, remove all references to APP_STATE from your manifest and app. The App State API, used for Play Games Services, has been deprecated and may cause issues in authorization.

You indicate that your APP_ID is coming from a keytool -list call but this sounds incorrect. APP_ID corresponds to the Play Games Services application ID and is only used for Play Games Services features. You only should be running:

keytool -list -keystore ~/.android/debug.keystore

for getting a SHA-1 hash. This hash is used to register your Android application (which has package name com.example.gsignin) on the Google Developer Console.

Hope that helps, you might be best off by starting with the working sample that I pointed you to and then working from there to figure out where things are breaking.


Post a Comment for "Android : Google Sign In GoogleApiClient.connect()"