To help you test your app on Wear OS 4 Developer Preview, Android Studio includes support for an emulator. This emulator lets you do the following:
- Test behavior changes in Wear OS 4 Developer Preview.
- Explore the new features that are available in Wear OS 4 Developer Preview.
- View the watch faces that you create using Watch Face Studio.
- Pair with another device.
It's a straightforward process to set up the emulator. You can test different screen sizes and watch face shapes as well.
Download and install the emulator
To set up a virtual device to emulate a Wear OS 4 device, follow these steps:
Download the latest preview release of Android Studio.
In Android Studio, click Tools > SDK Manager.
In the SDK Tools tab, select the latest version of Android Emulator, and click OK. This action installs the latest version if it isn't already installed.
In Android Studio, open the Device Manager by selecting Tools > Device Manager. Click Create device.
In the Category pane, select Wear OS and choose a hardware profile. Click Next.
Select a Wear OS 4 system image to download, which is the image with API Level 33 and the Target Android 13 (Wear OS 4 - Preview). If you don't already have a Wear OS 4 system image installed that matches your device definition, click Download next to the Release Name to get it.
Click Next and then click Finish.
Test your app on the emulator
After creating the virtual device, you can run and test your application on a Wear OS 4 emulator. To do so, follow these steps:
- Go to the Android Studio toolbar and select the virtual device you just created.
- Click Run .
Emulator doesn't support unmanaged 32-bit code
Wear OS 4 Developer Preview doesn't support 32-bit emulator system images. By supporting only 64-bit images, Wear OS provides performance and security improvements, and it prepares your app for upcoming 64-bit-only hardware.
If you know or suspect that your app uses native code (that isn't written in the Kotlin or Java programming languages), check that your app includes both 32-bit and 64-bit native libraries.
Learn more about how to support 64-bit architectures.
Emulator support for Bluetooth
The emulator also supports emulated Bluetooth, which lets you test several use cases related to Bluetooth audio.
Pair with an emulated phone
Using the emulator's Bluetooth support, you can pair with an emulated phone. To do so, enable the setup wizard from the command line:
Play audio through emulated output device
Using the emulator's Bluetooth support, you can also play audio through an emulated Bluetooth output device. To test audio output switching in the emulator, connect to an emulated Bluetooth output device using the open-source Bumble project.
To prepare your development machine for using Bumble, complete the following steps:
Fetch the Bumble source code:
git clone https://github.com/google/bumble
Navigate to the
bumbledirectory, then build and install Bumble modules:
cd bumble && python3 -m pip install "."
Launch emulated Bluetooth speaker
To launch the emulated speaker, complete the following steps:
Launch the Wear OS 4 emulator.
Note: If you're using a Wear OS 4 emulator version lower than
33.1.10, launch the Wear OS 4 emulator from the command line using the
To discover and connect to the emulated speaker, run the following command in the
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \ android-netsim stdout | ffplay -i
The audio output is played through your computer's speakers.
You can also redirect output to a file:
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \ android-netsim output.sbc