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