Shaun
Shaun

Reputation: 5531

Android Google App Engine Tutorial wont work

So I have been trying for the last 5 hours to get this Google App Engine to work with Android. I have been following their tutorials (there are two, which are slightly different, but neither work). So here are the steps that I am doing

  1. Create a project in the Google Developers console (noting project ID and project number)
  2. Cloning the code from the GIT repository found here (https://github.com/GoogleCloudPlatform/solutions-mobile-backend-starter-android-client)
  3. Imported the google-play-services_lib project in the SDK folder because it is missing from the project
  4. Setting the Android build to Google API
  5. Setting the Const.java file constants to my project ID and number (it also asks for web client id but cant find it anywhere, and in the tutorials it does not mention this)
  6. If I try to run the program here it FC's because of the version number for Google Play Services. So, a work around is I set that to 4030500 like it asks or to @integer/google_play_services or something to that effect)
  7. Run the app, but it gives a toast with GoogleAuthIOException

So, I am at a loss and just want to yank my hair out. This service sounds perfect for the app I want to develop but Google has severely broken documentation and I cant seem to work my way through it. If one of the gurus out there that has been able to get this to work would help, taht would be great.

Upvotes: 2

Views: 355

Answers (2)

Shaun
Shaun

Reputation: 5531

I managed to get it to work. Once I followed everything above, I just used the Client Id hash that was given in GDC and put it into the Web Client ID in the Const.java file.... I wish Google would just update their tutorials so that we wouldnt have to fumble through it so much.

Upvotes: 0

clotilde
clotilde

Reputation: 131

I got the same GoogleAuthIOException following this tutorial when running the Mobile Backend in "Open (for development use only)" authentication mode.

But it worked using "Secured by Client IDs" mode, doing these steps :

  • create a Client ID for web application (from cloud console -> APIs & Auth -> Credentials -> Create New Client and select "Web Application"
  • Set your backend Authentication to "Secured by Client IDs (Recommended)" and put the web client ID just generated
  • put the same web client ID in the android code (Consts.java)

Upvotes: 1

Related Questions