Wet mode

Wet mode is a feature in Wear OS that disables the touchscreen to avoid accidental screen taps, including water on the screen mistakenly registering as screen taps.

Enable wet mode manually by selecting Settings > Display > Touch Lock. Once in wet mode, disable wet mode by holding the specified hardware button.

Wet mode can also be both enabled and disabled programmatically.

Set up permissions

Two separate permissions are required to use wet mode. One permission is required for enabling, and one for disabling wet mode from within your application. Be sure to include the following in your Android manifest file:

<!-- required for enabling wet mode -->
<uses-permission android:name="com.google.android.clockwork.settings.WATCH_TOUCH" />
<!-- required for disabling wet mode -->
<uses-permission android:name="com.google.android.clockwork.settings.END_WET_MODE" />

Enable wet mode

Enable wet mode by using the following broadcast:

const val ACTION_ENABLE_WET_MODE =
    "com.google.android.wearable.action.ENABLE_WET_MODE"

...

sendBroadcast(Intent(ACTION_ENABLE_WET_MODE))

When you enable wet mode, you can specify which activity to launch once wet mode is disabled, as shown in the following example:

// Component name of the activity to relaunch (if any) when ending wet mode
const val EXTRA_RELAUNCH_COMPONENT_NAME = "relaunch_component_name"
const val ACTION_ENABLE_WET_MODE =
    "com.google.android.wearable.action.ENABLE_WET_MODE"

...

sendBroadcast(
   Intent()
       .setAction(ACTION_ENABLE_WET_MODE)
       .putExtra(EXTRA_RELAUNCH_COMPONENT_NAME, componentName.flattenToString())
)

Disable wet mode

Disable wet mode by using the following broadcast:

private const val ACTION_END_WET_MODE =
    "com.google.android.clockwork.actions.END_WET_MODE"

...

sendBroadcast(Intent(ACTION_END_WET_MODE))