Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Nov 2008

    Do we have Touch API in J2ME?


    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?


  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: Do we have Touch API in J2ME?

    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.


Similar Threads

    By antonio5982 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-10-10, 15:48
  2. write an own j2me api?
    By Rozik in forum Mobile Java General
    Replies: 7
    Last Post: 2007-12-07, 14:11
  3. SIP API - J2ME
    By venkatt_shankar in forum Mobile Java General
    Replies: 0
    Last Post: 2007-05-28, 07:37
  4. Available US Phones with J2ME Bluetooth API
    By rmontrose in forum Bluetooth Technology
    Replies: 1
    Last Post: 2004-03-01, 00:35
  5. J2ME API development.
    By chitturi in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-02-06, 16:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts