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?
Asked
Active
Viewed 2,239 times
3

gregoiregentil
- 1,793
- 1
- 26
- 56
-
1have you tried isintouchmode http://developer.android.com/reference/android/view/View.html#isInTouchMode%28%29? – nandeesh Aug 12 '12 at 11:05
-
Is there similar functionality to detect this in Javascript on a web page? To set a hover event for mouse, and click/tap event for other Androids, for example? – NoBugs Oct 29 '12 at 20:22
1 Answers
2
As suggested by nandeesh in the comment section, "isintouchmode" is the answer to this question.

gregoiregentil
- 1,793
- 1
- 26
- 56