Detect if touch device

Posted by Kilnr on Stack Overflow See other posts from Stack Overflow or by Kilnr
Published on 2010-03-19T11:02:33Z Indexed on 2010/03/19 16:41 UTC
Read the original article Hit count: 319

Filed under:
|
|
|

Hello,

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.

© Stack Overflow or respective owner

Related posts about j2me

Related posts about midp