简体   繁体   English

Wear OS 应用程序仅在调试时与手机通信

[英]Wear OS app communicates with phone in debug only

I have a Wear OS and phone application that communicate with eachover fine when run through android studio on debug mode with the phone connected to the watch via bluetooth.我有一个 Wear OS 和手机应用程序,当通过 android 工作室在调试模式下运行时,通过蓝牙将手机连接到手表时,它们可以正常通信。

However, for testing purposes and distribution I have published the Wear OS application via the Google Play Console as an internal test and the phone app simply via sharing the.apk via google drive.但是,出于测试和分发的目的,我已经通过 Google Play 控制台发布了 Wear OS 应用程序作为内部测试,而手机应用程序只是通过谷歌驱动器共享.apk 来发布。

When I launch the internal test published Wear OS application and install the shared.apk from google drive the phone and watch do not communicate with eachover.当我启动内部测试发布的 Wear OS 应用程序并从谷歌驱动器安装 shared.apk 时,手机和手表不与每个人通信。

Is there something I am missing here?我在这里缺少什么吗? Is there perhaps an easier way to distribute the watch and phone app together to test?是否有更简单的方法将手表和手机应用程序一起分发以进行测试?

To be able to communicate the two applications must be signed with the same certificate.为了能够进行通信,两个应用程序必须使用相同的证书进行签名。 To be able to upload to the Play Store you must sign with a proper certificate.为了能够上传到 Play 商店,您必须使用适当的证书进行签名。 Make sure that you also sign the other application using the same certificate, and not just the default debug certificate.确保您还使用相同的证书签署其他应用程序,而不仅仅是默认调试证书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM