×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Telling the touch-enabled and non-touch enabled phones apart

    The Asha series contains some fully touch-controlled (501) both touch and type and purely type devices.

    How can I programatically tell on what device type I am running? I am specifically interested in an answer to one question: does the device I am running on have a touchscreen?

  2. #2
    Registered User
    Join Date
    May 2008
    Location
    Surat Thani
    Posts
    258

    Re: Telling the touch-enabled and non-touch enabled phones apart

    Quote Originally Posted by Utumno View Post
    The Asha series contains some fully touch-controlled (501) both touch and type and purely type devices.

    How can I programatically tell on what device type I am running? I am specifically interested in an answer to one question: does the device I am running on have a touchscreen?
    Canvas.hasPointerEvents() will tell you whether the device has a touchscreen - not sure if there's any nice way to tell the difference between full touch and touch and type though.

  3. #3
    Registered User
    Join Date
    May 2008
    Location
    Surat Thani
    Posts
    258

    Re: Telling the touch-enabled and non-touch enabled phones apart

    Quote Originally Posted by TongMuan View Post
    not sure if there's any nice way to tell the difference between full touch and touch and type though.
    Just checked, the system property com.nokia.keyboard.type seems to work for this.

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2005
    Location
    Campina Grande/PB - Brazil
    Posts
    138

    Re: Telling the touch-enabled and non-touch enabled phones apart

    Use the system property "com.nokia.keyboard.type" like TongMuan says and test with this code:

    String keyboard = System.getProperty("com.nokia.keyboard.type");
    if (keyboard.equals("OnekeyBack")){
    // this is the Nokia Asha 501 =)
    }

    Regards,
    Maurilio

Similar Threads

  1. Infinite "canvas touch enabled: true" prints...
    By vitali.pom in forum Mobile Java General
    Replies: 2
    Last Post: 2011-10-31, 15:07
  2. Touch Enabled apps.
    By kumar1234567 in forum Mobile Java General
    Replies: 3
    Last Post: 2011-05-24, 07:06
  3. Replies: 12
    Last Post: 2010-09-21, 17:06
  4. Full screen support for touch enabled MIDlet
    By forceoflight in forum Mobile Java General
    Replies: 6
    Last Post: 2009-12-14, 08:53
  5. GPS enabled phones
    By kapapra in forum General Development Questions
    Replies: 1
    Last Post: 2003-10-28, 20:54

Posting Permissions

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