Home > Net >  WearOS app debugging with mobile application connectivity
WearOS app debugging with mobile application connectivity

Time:04-10

I've created an android application, with a wear module contained within it. When I run the mobile application debugger on a physical device through USB, I see it doesn't package the wear application with it and so I cannot install the linked watch application on my watch (which is linked through ADB over wi-fi). While the mobile device debugger is running, I run the debugger for the watch app and the app runs on the watch, but I have code in the mobile app to detect when the watch is connected and it never does connect. The app works though when it is published and the watch connectivity is established when I install the watch app through the 'apps on your phone' menu on my watch.

How can I achieve the connectivity between the watch and phone apps through the debugger? This is a massive pain point for me and I can't seem to find anything on google or stackoverflow that describes how best to set up debug environments so that these apps are linked on the 2 devices and can communicate. My mobile device app is heavily dependent on detecting watch sensors and interacting with them and so I need an efficient way to test this.

Thanks!

CodePudding user response:

Are you using emulators locally or testing on the same devices?

If you are testing on the same devices, be aware that Wear connectivity only works when the package and signature both match. It is standard for debug builds to have a different signature than a release build. So only the debug build of the watch app can talk to the debug build of the phone app.

  • Related