GoogleApiClient is throwing “GoogleApiClient is not connected yet” AFTER onConnected function getting called

I just noticed that you are creating the googleApiClient in onStartCommand(). This seems like a bad idea. Let’s say that your service gets triggered twice. Two googleApiClient objects will get created, but you’ll only have reference to one. If the one whose reference you don’t have executes its callback to onConnected(), you will be connected … Read more

Using Postman to access OAuth 2.0 Google APIs

Postman will query Google API impersonating a Web Application Generate an OAuth 2.0 token: Ensure that the Google APIs are enabled Create an OAuth 2.0 client ID Go to Google Console -> API -> OAuth consent screen Add getpostman.com to the Authorized domains. Click Save. Go to Google Console -> API -> Credentials Click ‘Create … Read more

Error: ‘The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.’

I understand you. Google confuses you with changing service names and workflows. Their documents aren’t updated enough to match their newest API workflows. I was using the Google Play Developer Service API v2 on the server-side with an alpha-version APK, and had the same error as you: “The project id used to call the Google … Read more

How do I add/create/insert files to Google Drive through the API?

The documentation on insert operations already contains examples in a bunch of programming languages, here is how to do it using the HTTP based protocol of the Google Drive API. First, POST the new file metadata to the Drive endpoint. It has to be in the form of a File resource JSON object: POST /drive/v2/files … Read more