Guidelines for OEM device implementers

To enable Bluetooth stylus support, OEM device implementers must support Bluetooth
(and should support BTLE for wider compatibility). The platform handles data
collection, timing correlation, and rendering to the application for supported
stylus events.

At this time, the Android CTS does not include tests to
ensure existing APIs for touch events support default behavior. As a
workaround, we recommend creating a stylus accessory or emulator that can
simulate stylus events.

Guidelines for stylus accessory creators

To implement support on a stylus device, device implementers must use the Stylus
Human Interface Device (HID) Descriptor shown below to describe how stylus data
(pressure sensitivity, eraser, side buttons, device ID, etc.) is represented.
The stylus device sends the HID information to the Android mobile device,
enabling the platform to correlate HID data with touch data from the touchscreen
to produce stylus events via MotionEvent. Data can be sent over Bluetooth (BT),
Bluetooth Low Energy (BTLE), or USB.

Guidelines for stylus application developers

The Android 6.0 platform automatically handles pairing and event correlation,
so both existing and new applications running on Android 6.0 support Bluetooth
stylus by default. For details on Bluetooth stylus APIs, refer to
developer.android.com.

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.