Greetings,
I am planing to create touch based J2ME application. Currently I am not sure if you can control touch input in canvas based application. Do we have JSRxxx for that and in which devices it is implemented?
-FoL
Greetings,
I am planing to create touch based J2ME application. Currently I am not sure if you can control touch input in canvas based application. Do we have JSRxxx for that and in which devices it is implemented?
-FoL
Canvas has the methods hasPointerEvents() and hasPointerMotionEvents(). These allow you to find out what the touch-screen capabilities of the device are. Pointer events (if supported) are delivered by pointerPressed(x,y), pointerReleased(x,y) and pointerDragged(x,y).
(Strictly, these are not touch-screen events specifically. They could relate to any kind of pointer-based input, like a mouse or trackball. However, I have only seen them supported on touch-screen devices.)
You need no specific JSRs. These features are standard in MIDP-1.0 and later. Since they exist on all MIDP devices, you do not need a specific "touch" version of your application.
Cheers,
Graham.