简体   繁体   中英

Android wearable - how to auto install wearable app

I have created two simple modules in my android project. One module is called handHeld and the other module is called wearable. in the manifest of handHeld i set wearable as a dependency (it was set for me already by the system). I was expecting that when i load handHeld onto a device that it would automatically synch wearable onto the watch but im not seeing that on the emulator (after doing a port fwd). Communication between the watch and device works as i can see notifications appearing and synched. How can i get my wearable app to load onto the watch at the same time as when i install handHeld module onto my device ?

It will only auto-install with an app signed with a release keystore, if you're building the debug version you will need to manually add it to your watch with adb.

Note: The automatic installation of wearable apps does not work when you are signing apps with a debug key and only works with release keys. See Packaging Wearable Apps for complete information on how to properly package wearable apps.

https://developer.android.com/training/wearables/apps/creating.html

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