I have a watch face which I am trying to connect to the Google Play Services to get the user's heart rate data. I have created an OAuth 2.0 client ID and have followed the guide.
Here is my setup code from OnCreate():
googleApiClient = new GoogleApiClient.Builder(this)
.addApi(Wearable.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Fitness.SENSORS_API)
.addScope(new Scope(Scopes.FITNESS_LOCATION_READ))
.build();
googleApiClient.connect();
I am triggering the OnConnectionFailed() listener. here is the ConnectionResult:
ConnectionResult{statusCode=INVALID_ACCOUNT, resolution=null, message=null}
My full class can be found here: http://pastebin.com/qNuvRY3F
I've either missed something or I am doing all this in the wrong place. Probably both. I may need to get this data from my mobile device and send this data over via the DataLayer, which I am still trying to figure out how to do in a background service, which to send alongside battery info, weather data etc.
Any insight is appreciated. Thanks