简体   繁体   English

如何与Android Wear 2.0同步数据(独立APK)

[英]How to sync data with android wear 2.0 (standalone apk)

I want to publish android wear2.0(standalone) apk to the playstore.My phone app is already published on the playstore with wear1.0.4 embedded apk. 我想将Android Wear2.0(独立版)apk发布到Playstore。我的手机应用程序已经发布在Playstore上,并带有Wear1.0.4嵌入式APK。 Right now I am running wear2.0 apk on emulator for testing. 现在,我正在模拟器上运行wear2.0 apk进行测试。 But I have no clue how to sync it with my android phone(without using bluetooth) or an iphone. 但是我不知道如何将其与我的Android手机(不使用蓝牙)或iPhone同步。 Please guide me. 请指导我。

The same way as Wear 1.0. 与Wear 1.0相同。 The way I've been publishing the phone app and the wear app is that my wear app's version code is one higher than the phone app but since it differentiates by feature (watch), both are on the Play store simultaneously. 我发布手机应用程序和Wear应用程序的方式是,我的Wear应用程序的版本代码比手机应用程序高1,但是由于它通过功能(手表)来区分,因此两者都同时在Play商店中。 The embedded apk for wear 1.0 goes to the watch with the phone app but wear 2.0 watches show a notification for the user to download your (wear 2.0) app from the watch play store. 穿戴式1.0的嵌入式apk通过手机应用程序进入手表,但穿戴式2.0手表向用户显示一条通知,供用户从手表游戏商店下载(穿戴式2.0)应用程序。

As long as the package names are the same, you can sync data using the Data APIs. 只要包名称相同,就可以使用Data API同步数据。 Less recommended but since the watch has Internet now, you can even sync in other ways. 不建议使用,但由于手表现在可以上网,因此您甚至可以其他方式同步。

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

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