Wednesday, October 24, 2018

Android Vesture Sdk Together With Emulator Update

Posted past times Hoi Lam, Lead Developer Advocate, Android Wear
Today nosotros launched the latest version of the Android Wear SDK (2.2.0) amongst several picket confront related enhancements. These include the add-on of an unread notification indicator for all picket faces, which is planned to live business office of the upcoming consumer unloosen of Android Wear. With the Wear SDK 2.2.0, you lot tin customize the notification indicator or display your own. This characteristic is available to the developer community early, via the SDK too emulator, then you lot tin verify that the indicator fits the pattern of your picket face. In addition, nosotros are adding enhancements to the ComplicationDrawable degree too publishing the concluding version of the Wear emulator based on Android Oreo.

Introducing the unread notification indicator


Notification is a vital business office of the Wear experience. As a result, starting from the adjacent consumer unloosen of Wear (version 2.9.0), a dot-shaped indicator volition live displayed past times default at the bottom of the picket confront if at that spot are new, unread notifications. Watch confront developers tin preview the indicator amongst their picket faces past times using the latest version of the emulator. Developers tin customise the indicator's accent coloring via WatchFaceStyle.setAccentColor - the default coloring is white every bit shown inwards the event below, only developers tin laid the coloring for the band unopen to the point to an accent coloring of their choice, to gibe the residual of the picket face.
If the novel indicator does non fit amongst the pattern of your picket face, you lot tin switch it off using WatchFaceStyle.setHideNotificationIndicator too lead some other alternative for displaying the notification, including: 1) displaying the number of unread notifications inwards the organisation tray using WatchFaceStyle.setShowUnreadCountIndicator, or 2) getting the number of unread notifications using WatchFaceStyle.getUnreadCount too displaying the number inwards a means that fits your picket face's unique style.

Enhancement to ComplicationDrawable


We launched the ComplicationDrawable degree at lastly year's Google I/O, too nosotros are continuing to meliorate it. In this latest SDK release, nosotros added 2 enhancements:
  • Permission Handling - If the picket confront lacks the right permission to display the content of a complication, the complication type of TYPE_NO_PERMISSION is issued. ComplicationDrawable at i time handles this automatically too volition launch a permission asking inwards onTap. If you lot previously implemented your ain code to commencement the permission screen, delight banking concern check that the permission covert is non triggered twice and, if necessary, take away unneeded code.
  • Drawable Callback - If a complication contains an ikon or an icon, it tin accept a pocket-sized amount of fourth dimension to charge subsequently the other initial information arrives. Our previous recommendation thence was that you lot redraw the covert every second. But this is unnecessary for picket faces that alone update i time per minute, for example. As a result, nosotros cause got added novel back upward for Drawable.Callback to ComplicationDrawable. Developers who update the covert less oft than i time per 2nd should adopt this novel callback to redraw the picket confront when images cause got loaded.
For more, delight encounter the Android Wear Release Notes which includes other information regarding the emulator.

More improvements to come


Many of you lot cause got noticed a steady unloosen of enhancements to Android Wear over the lastly few months since the launch of Wear 2.0. We are developing many to a greater extent than for the months ahead too await frontwards to sharing to a greater extent than when the features are ready.



Related Post

Android Vesture Sdk Together With Emulator Update
4/ 5
Oleh