Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 4.x: detect mouse or touchscreen mode

There is an API to detect if Android 4.x (ICS or JB) is in touchscreen or mouse mode. Android can actually go from one mode to the other: if you are in mouse mode (a cursor is displayed) and you do a touchscreen press, the mouse will disappear. In an apk application, I would like to query the state of mouse vs. touchscreen. This feature is only for > 4.0. Does anyone know this API?

like image 894
gregoiregentil Avatar asked Feb 25 '26 23:02

gregoiregentil


1 Answers

As suggested by nandeesh in the comment section, "isintouchmode" is the answer to this question.

like image 52
gregoiregentil Avatar answered Feb 27 '26 11:02

gregoiregentil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!