Detecting Stylus Removal and Insertion

NVIDIA has extended the Android framework to send out broadcast intents, when the hardware sensor in the device detects that the stylus has been removed or inserted. The broadcast intent will be active if the device manufacturer includes a stylus sensor in their device. Devices based on the Tegra NOTE complete platform include the necessary stylus sensor.

If your application needs to perform a special action when the stylus is removed from or inserted into the device, you need to listen for the com.nvidia.intent.action.PEN_CHANGED intent and examine state for inserted (stylus inserted) or removed (stylus removed).

Your application should be able to handle repeated broadcast intents with the same value.

Intent Name Extras
com.nvidia.intent.action.PEN_CHANGED state = inserted / removed

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.200605 ©2014-2020. NVIDIA Corporation. All Rights Reserved.