如何在Glass XE22上正确使用Google API客户端

时间:2014-11-09 22:24:44

标签: google-glass google-gdk wear-os google-api-client

我目前正在尝试使用以下代码创建ApiClient连接

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

mGoogleApiClient.connect();

但在

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

我得到了这个:

ConnectionResult{statusCode=SERVICE_INVALID, resolution=null}

如果我正确阅读in the manual,则这与播放错误的版本相对应。

因此,我是否因为正确连接在Glass上运行代码而遗漏了一些内容,或者这还不支持?

为了让您大致了解我想要做什么,我想实施this example

1 个答案:

答案 0 :(得分:3)

目前,Glass不支持Google Play服务。我们的问题跟踪器目前正在跟踪issue 176,因此您可以在以后查看更多信息。