简体   繁体   English

Android Wearable Message API根本不起作用

[英]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_CHANGEDcom.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.

相关问题 Android:可穿戴设备未收到Message Api消息 - Android: Wearable not receiving Message Api message MediaPlayer 是否适用于 android 的所有 API 版本? - Does MediaPlayer work in all API versions of android? Android Wearable API:如何传递动态列表? - Android Wearable API: how to pass a dynamic List? 安卓可穿戴设备-如果手机振动也可以观看 - android wearable - if phone vibrates does watch also MessageAPI android Wear,可以发送消息给wearable,但是wearable无法发回消息 - MessageAPI android Wear, can send message to wearable, but wearable cannot send message back 在Android可穿戴设备中实现MAP(蓝牙消息访问协议) - Implementing MAP (Bluetooth Message Access Protocol) in an Android wearable 消息从可穿戴到电话 - Message from Wearable to Phone Android Fitness API无法从可穿戴传感器读取数据 - Android Fitness API not reading data from wearable sensors 为什么Android应用调试版本会删除可穿戴版本 - Why does Android app debug version remove wearable version Android SDK API 离线文档不适用于 ZC31B32364CE19CA8FCD150A417ECCEZZ 工作室,所有下载包均不可用 - Android SDK API offline documentation does not work on android studio , All Packages are not available for download
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM