Skip to content

Most visited

Recently visited


Using Speakers on Wearables

Some Wear OS devices include speakers, enabling them to incorporate sound into their apps and offer an extra dimension of engagement with the user. A speaker-equipped Wear device might trigger a clock or timer alarm, complete with audio notification. Games on Wear become become more entertaining by offering not just sight, but sound.

This page describes how apps on Wear can use familiar Android APIs to play sounds through the device speaker.

Refer to the following related resources:

Detect the Speaker

A Wear app must first detect whether the wearable device has a speaker. In the following example, the app uses the getDevices() method in conjunction with the value of FEATURE_AUDIO_OUTPUT to confirm that the device is equipped with a speaker.

PackageManager packageManager = context.getPackageManager();
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);

// Check whether the device has a speaker.
    // Check FEATURE_AUDIO_OUTPUT to guard against false positives.
    if (!packageManager.hasSystemFeature(PackageManager.FEATURE_AUDIO_OUTPUT)) {
        return false;

    AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS);
    for (AudioDeviceInfo device : devices) {
        if (device.getType() == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER) {
            return true;
return false;

Play Sounds

Once you've detected the speaker, the process for playing sound on Wear OS is the same as for a handset or other device. For more information, see Media Playback.

If you also want to record audio from the microphone on the wearable, your app must also get permission to use the microphone. To learn more, see Permissions on Wear OS.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)