Send message from wearable to phone and then immediately reply

前端 未结 1 2023
野的像风
野的像风 2021-02-05 23:06

I\'ve been battling with the Android Wear Message API all day today and have finally accepted I need some help with this.

My app is very straightforward. The Mobile port

相关标签:
1条回答
  • 2021-02-05 23:46

    You never call MessageApi.addListener() in your Wear activity so your MessageListener is never registered to receive messages. You should also call MessageApi.removeListener() when your activity is being destroyed.

    Note: both methods require a connected GoogleApiClient. It may make logic easier if you leave a GoogleApiClient open throughout the duration of your activity rather than try connecting/removeListener()/disconnect in your onDestroy().

    0 讨论(0)
提交回复
热议问题