Wearable.NodeApi.getConnectedNodes result never called

后端 未结 4 2451
情歌与酒
情歌与酒 2021-02-20 05:56

i developing an app for android wear. Below code with explanation of the problem

 if(mGoogleApiClient.isConnected()){
            K.i(\"Always called!\");
               


        
4条回答
  •  臣服心动
    2021-02-20 06:22

    I believe you can only call getConnectedNodes once per GoogleApiClient connection. You want to cache the node ID the first time you get the result, and then use the onPeerConnected/Disconnected() callbacks to track whether the node ID is still relevant.

提交回复
热议问题