1

I was wondering if it is actually possible to pair a physical Wear OS device to a virtual android phone in Android Studio. I am currently developing a fitness app that makes use of the Health Service API, but because it is only compatible with Android 11+ I cannot use a physical phone (my phone runs Android 10 and isn't updateable) to run the corresponding companion app on. Additionally a virtual wear OS device cannot be used because the emulator doesn't as of yet have support for an exercise type I am interested in (no weightlifting category - see here).

Essentially this means I require my companion app to run on my physical watch (a Galaxy Watch 5 running Wear OS 3.5) and the phone app to run virtually in the Android Studio emulator (a Pixel 4 running Android 12) and have them communicate. I recently attempted to have my physical watch pair with the virtual phone using Android Studio's Wear OS Pairing Assistant feature but was unable to - with Android Studio saying "Wear OS pairing assistant cannot pair unsupported devices" See here.

When checking the documentation for pairing wearables and devices it doesn't seem there is any information on pairing a virtual phone with a physical watch, the only instructions I find are about connecting a physical phone to a watch emulator . I understand that Wear OS 3 is not compatible with the Wear OS app, and this app seems to be needed when attempting to pair a watch through the phone emulator. This is a summary of what I tried:

  • Attempted to pair my Watch 5 to the virtual Pixel 4 using Android Studio's 'Pair Wearable' in the Device Manager tab
  • Attempted to pair using the Pixel 4's Wear OS app but couldn't see the watch and only had the option to 'Pair with emulator'

I was wondering if there is any way in Android Studio or (perhaps a command in adb) that would allow me to pair my physical watch to the virtual phone. This question was asked a little while back here but I wondered if there had been any updates? Thanks :)

Duckington
  • 11
  • 2
  • The Samsung watch should pair with [this](https://play.google.com/store/apps/details?id=com.samsung.android.app.watchmanager) companion app, you should try to download it to the Pixel 4 emulator and try to pair – Gustavo Pagani Jun 02 '23 at 08:40
  • Thanks for the response! I tried downloading the Samsung companion app in the Pixel emulator and it didn't see the Watch unfortunately. I believe this is a consequence of the emulator [not supporting Bluetooth](https://stackoverflow.com/questions/22604305/how-to-use-android-emulator-for-testing-bluetooth-application) which perhaps might explain why the wearable app didn't see my Watch 5. A possible solution might be using a virtual machine that utilises the host computer's Bluetooth and using the Samsung companion app to connect to the watch :) – Duckington Jun 02 '23 at 13:00

1 Answers1

0

Your emulator needs to setup to use your PC's Bluetooth in order to discover your physical WearOS device.

samygj
  • 1
  • 2