[英]Android Wearable Message API does not work at all
I tried some basic communication tutorial between mobile(handheld) and wearable but it doesn't work at all. 我在移动(手持)和可穿戴之间尝试了一些基本的通信教程 ,但它根本不起作用。 Whenever I check the result of sendMessage, it says
SUCCESS
but receiver is never called. 每当我检查sendMessage的结果时,它会说
SUCCESS
但是从不调用接收器。
I also changed deprecated com.google.android.gms.wearable.BIND_LISTENER
to com.google.android.gms.wearable.DATA_CHANGED
and com.google.android.gms.wearable.MESSAGE_RECEIVED
but it still not working. 我还将已弃用的
com.google.android.gms.wearable.BIND_LISTENER
更改为com.google.android.gms.wearable.DATA_CHANGED
和com.google.android.gms.wearable.MESSAGE_RECEIVED
但它仍无效。
Does this log relevant to this phenomenon? 这个日志是否与这种现象有关?
06-04 23:34:00.625 2789-2805/com.ptrprograms.wearmessageapi W/GooglePlayServicesUtil: Google Play services out of date. Requires 9080000 but found 8701534
06-04 23:34:00.625 2789-2805/com.ptrprograms.wearmessageapi W/GooglePlayServicesUtil: Google Play services out of date. Requires 9080000 but found 8701534
(However, the only wearable I have supports Google Play Service up to 8.7.01 and I can't download SDK for 8.7.01 from anywhere in this world) 06-04 23:34:00.625 2789-2805/com.ptrprograms.wearmessageapi W/GooglePlayServicesUtil: Google Play services out of date. Requires 9080000 but found 8701534
(但是,我唯一支持Google Play服务的可穿戴设备高达8.7.01,我无法从这个世界的任何地方下载SDK for 8.7.01)
It was because the app never called GoogleApiClient's connect method such as googleApiClient.connect()
and googleApiClient.blockingConnect()
. 这是因为该应用程序从未调用过GoogleApiClient的连接方法,例如
googleApiClient.connect()
和googleApiClient.blockingConnect()
。 However, while investigating the issue, I created some working skeleton app for Android Wearable Messaging API . 但是,在调查此问题时,我为Android Wearable Messaging API创建了一些有用的骨架应用程序 。 *I also resolved the outdated warning by setting Play-Service-Wearable 's version into "7.5.0".
*我还通过将Play-Service-Wearable的版本设置为“7.5.0”来解决过时的警告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.