I'm writing a MIDlet using the Kuix UI toolkit, and I want to make changes to the toolkit depending on whether the current device is a touch screen device. (These changes include making buttons bigger, for easier tapping.)
Is there a way to detect whether the device has a touch screen using J2ME (MIDP 2)?
[edit] as a (crappy) workaround I check for the screen height instead. A screen width a height of higher than 240 is likely a touch screen... Please let me know if there are any more effective ways.
try Canvas.hasPointerEvents()
-- it seems to be an instance method. No idea why this isn't static.
http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Canvas.html
Checks if the platform supports pointer press and release events.