Ice Cream Sandwich adds native stylus support to Android

Android 4.0 Ice Cream Sandwich includes native support for smartphones and tablets with a digital stylus Google has confirmed, including pressure recognition, hover tracking and nib-tilt, with differentiation between pen and finger use. A specific stylus API, spotted by Reddit among the Android 4.0 highlights, can differentiate between a stylus, finger, mouse and eraser, as well as support pens with up to three buttons. Previously, devices like the HTC Flyer and Samsung Galaxy Note required custom pen-control systems be created to handle their digital styli.

Google expects the new support to be used to improve Android phones and tablets in drawing and sketching applications, as well as boosting precision for gestures. Handwriting and shape recognition are also possible, though currently Android lacks a native handwriting recognition engine.

Stylus input, button support, hover events

Android 4.0 includes full support for stylus input events, including tilt and distance axes, pressure, and related motion event properties. To help applications distinguish motion events from different sources, the platform adds distinct tool types for stylus, finger, mouse, and eraser. For improved input from multi-button pointing devices, the platform now provides distinct primary, secondary, and tertiary buttons, as well as back and forward buttons. Hover-enter and hover-exit events are also added, for improved navigation and accessibility. Developers can build on these new input features to add powerful interactions to their apps, such as precise drawing and gesturing, handwriting and shape recognition, improved mouse input, and others.

Google has added a basic painting app, TouchPaint, to its API demo code, allowing developers to get to grips with the different elements of the new functionality.

It remains to be seen what HTC and Samsung will do regarding their own custom APIs, which each firm had been hoping developers would adopt and build on. Samsung released the Galaxy Note source code yesterday, part of its strategy to get third-parties to produce apps for the S Pen stylus, while HTCdev team told us earlier this month that it, too, was prioritizing the Flyer and Jetstream pen API in its developer outreach.

HTC's eventual goal, the company said, was to see things like stylus APIs integrated into the core Google Android codebase. Whether it expected to see that happen quite so quickly is unclear.

Android 4.0 Ice Cream Sandwich demo:

[vms 4b1be110b7bf70c8362d]

[via NetbookNews]