简体   繁体   中英

Android Wear 2 standalone app DataLayerApi and Google Play distribution

I have an existed Android App in Google Play Store and have created an Android Wear 2 App (using SDK 25) as a standalone semi-independent one. Semi-independent means that the user could use some additional features if the Android App is installed but it's not necessary (I am planning to use DataLayerApi for the watch <-> phone communication). So before Wear 2 App's distribution on Google Play:

  1. Should I create a new app item in Google Play Developer Console in the apps list with a different package name and upload a new Wear APK there, completely separately from the existed Android App?
  2. Will DataLayerApi work for the Android Wear app and the Android App with different package names?

As specified in the documentation for packaging Wear 2.0 apps ,

If your Wear 2.0 app has an accompanying phone app, use the same package name for your Wear app and that phone app.

If you use different package names, your apps on the two devices will not be able to communicate with each other via the Wear APIs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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