Search code examples
google-glassgoogle-gdkwear-osgoogle-api-client

How to properly use Google API Client on Glass XE22


I'm currently trying to use the following code to create an ApiClient connection

mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addApi(Wearable.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();

mGoogleApiClient.connect();

but in

@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
    Log.d(TAG, "Connection failed");
    mGoogleApiClient.reconnect();
}

I'm getting this:

ConnectionResult{statusCode=SERVICE_INVALID, resolution=null}

If I'm reading correctly in the manual, this corresponds to the version of Play being wrong to begin with.

As such, am I missing something from properly connecting running the code on Glass or this is not supported yet?

To give you a rough idea of what I want to do, I want to implement this example.


Solution

  • Google Play Services is not supported on Glass at this time. This is currently being tracked as issue 176 in our issue tracker, so you can follow that for more info in the future.