LightBlog

jeudi 25 janvier 2018

Android Wear 2.9.0 will add unread notification indicators to watch faces

Android Wear, Google's slowly-but-steadily improving wearables platform, will be receiving an update in the near future with a pretty useful feature. On Thursday, Google announced a new Android Wear SDK version as well as the newest latest version of Android Wear, Android Wear 2.9.0.

Android Wear 2.9.0

Source: Google

Android Wear 2.9.0 adds an Android Oreo-like notification dot, which was optional before, to the bottom of first- and third-party watch faces. The dot-shaped icon is white by default, but watch face creators and developers can customize its color and the color of the ring around it via WatchFaceStyle.setAccentColor.

Alternatively, they can switch off the notification dot and replace it with a counter showing the total number of unread notifications, which will appear at top of the watch face in the system tray. Or if they're feeling adventurous, they can grab the number of unread notifications using WatchFaceStyle.getUnreadCount and tinker with the font and style.

Android Wear SDK 2.2.0

Source: Google

In addition to the new unread notification indicators, the latest Android Wear SDK improves the ComplicationDrawable class—the styleable drawable object that governs the behavior of watch face complications—that was introduced at Google I/O 2017.

Starting with Wear SDK 2.2.0, complications that lack the necessary permissions to display content (for example, a weather widget that doesn't request access to the internet) automatically launch permission requests in the onTap method.

The other big change has to do with screen redraws. Previously, Google recommended that watch faces with complications containing images or icons redraw the screen every second so that users aren't left waiting while they loaded. But that doesn't make a lot of sense for watch faces that update once per minute. Google's solution is a new callback in ComplicationDrawable, Drawable.Callback, that redraws the watch face when images have loaded.

You can preview Android Wear 2.9.0 by using the new Android Oreo-based emulator, but you should beware of a few bugs. Google says that activating Theater Mode in the emulator can cause it to remain stuck until you clear the emulator data, and within the window of emulators for API levels 25 and 26, the power button doesn't work. In addition, the China version of the emulator sometimes begins flashing if you use the handwriting input method, and if you click the button for the on-screen keyboard, the keyboard blocks half the screen.


Source: Google



from xda-developers http://ift.tt/2FiuMgC
via IFTTT

Aucun commentaire:

Enregistrer un commentaire