Today we launched the latest version of Android Wear SDK (2.2.0) with several improvements related to the clock. These include the addition of an unread notification indicator for all faces of the watch, which is planned to be part of the upcoming Android Wear consumer launch. With the Wear SDK 2.2.0, you can customize the notification indicator or show your own. This feature is available to the early developer community, through the SDK and the emulator, so you can check if the indicator matches the design of your watch. In addition, we are adding improvements to the ComplicationDrawable class and publishing the final version of the Wear emulator based on Android Oreo.

Presenting the unread notification indicator:

Notification is a vital part of the Wear experience. As a result, starting with the next consumer release (version 2.9.0), a dot-shaped indicator will appear by default at the bottom of the face of the watch if there are new unread notifications. See the face developers can see the indicator with their clock faces using the most recent version of the emulator. Developers can customize the accent color of the indicator through WatchFaceStyle.setAccentColor – the standard color is white, as shown in the following example, but developers can define the color of the ring around the point to an accent color of their choice, to correspond to the rest of the face view.

If the new indicator does not match the design of your watch, you can turn it off using WatchFaceStyle.setHideNotificationIndicator and choose another option to display the notification, including: 1) display the number of unread notifications in the system tray using WatchFaceStyle. setShowUnreadCountIndicator, or 2) get the number of unread notifications using WatchFaceStyle.getUnreadCount and display the number in a way that fits the unique style of your watch.

Improvement of the Drainable Complication:

We launched the ComplicationDrawable class in Google I / O last year and we continue to improve. In this latest version of the SDK, we add two improvements:
Permit manipulation – If the face of the watch does not have the correct permission to show the contents of a complication, the type of complication of TYPE_NO_PERMISSION is issued. ComplicationDrawable is now read automatically and a permission request will be initiated on onTap. If you have previously implemented your own code to start the permission screen, make sure that the permission screen is not activated twice and, if necessary, remove the unnecessary code.

Callback Drawable – If a complication contains an image or an icon, it may take a small amount of time to load after the arrival of the other initial data. Our previous recommendation, therefore, was that you redraw the screen every second. But this is not necessary for display faces that are updated only once per minute, for example. As a result, we added new support for Drawable.Callback for ComplicationDrawable. Developers who update the screen less frequently than once per second must adopt this new callback to redraw the face of the watch when the images are loaded.

For more information, see the Android Wear release notes, which include information about the emulator.

Improvements to come:

Many of you have noticed a steady launch of improvements in Android Wear in the last few months since the launch of Wear 2.0. We are developing many more in the coming months and we are eager to share more when the resources are ready.

Leave a Comment