Android 附近的消息API可以在wear OS设备上使用吗?
我需要找到我的手表和我计划使用的android手机之间的距离,我计划使用Android 附近的消息API可以在wear OS设备上使用吗?,android,wear-os,google-nearby,Android,Wear Os,Google Nearby,我需要找到我的手表和我计划使用的android手机之间的距离,我计划使用MessageListenerclassonDistanceChanged(Message Message,distance distance)方法回调。它返回距离对象,其中包含米信息 我在我的wear应用程序中添加了对附近play service的依赖项,但出现以下错误: E/GmsClient: unable to connect to service: com.google.android.gms.nearby.mes
MessageListener
classonDistanceChanged(Message Message,distance distance)
方法回调。它返回距离
对象,其中包含米信息
我在我的wear应用程序中添加了对附近play service的依赖项,但出现以下错误:
E/GmsClient: unable to connect to service: com.google.android.gms.nearby.messages.service.NearbyMessagesService.START on com.google.android.gms
我研究了这个API的细节,他们说要运行这个API,它需要Wi-fi、蓝牙和音频硬件。在我的wear设备上,没有Wifi适配器
附近的API对磨损有效吗 api需要这三样东西,因为它可能会使用所有这三样东西来三角测量您的位置,所以如果它说需要这三样东西,我敢打赌它不会起作用