About: Demonstrates how to create a DelayedConfirmationView in your wearable app. In this sample, pressing a button on the phone app sends a message to the wearable to start a simple activity. This activity displays a DelayedConfirmationView that starts when the user presses "Start Timer." Then, callbacks are implemented on both the wearable and phone to show when the timer is selected or finishes. The activity on the wearable uses BoxInsetLayout to automatically apply appropriate margins based on whether the display is square or circular.

How to run: Install the Application APK on the companion, and the Wearable APK on the wearable. Start the sample by running the DelayedConfirmation application on the companion and pressing "Start".

Wearable APIs used: MessageApi, NodeApi, WearableListenerService, BoxInsetLayout, DelayedConfirmationView

Screenshots:

DelayedConfirmation view
            in BoxInsetLayout with layout_box="top" DelayedConfirmation view
            in BoxInsetLayout with layout_box="all" DelayedConfirmationView
            selected notification Timer Selected toast on
            companion
From left to right: DelayedConfirmationView in a BoxInsetLayout with layout_box="top", the same view but with layout_box="all", the notification that shows up on the wearable when you select the timer before it finishes, and the toast generated on the phone at the same time. Note: normally you would make the circle's background the same color as the box background so users won't see the box's edges.