Use 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.

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.