Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2014
    Posts
    14

    How do you check if a device is Asha or S40 programatically?

    Searched around for this one but no luck. Is there some code that let's you determine whether your device is running Asha OS or S40?.

    I don't really want to create two similar codebases to solve this problem.

    Thanks!

  2. #2
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    285

    Re: How do you check if a device is Asha or S40 programatically?

    You can check if the device has a single back button. It it has, it is a Asha 501 or later.

    String nokiakeyboard = System.getProperty("com.nokia.keyboard.type");
    if( (nokiakeyboard != null) && nokiakeyboard.equals("OnekeyBack")){
    // You have Asha UI
    }

    See also
    http://developer.nokia.com/resources...a-devices.html

    Regards

    Karsten Meier

  3. #3
    Registered User
    Join Date
    Jul 2014
    Posts
    14

    Re: How do you check if a device is Asha or S40 programatically?

    Quote Originally Posted by internetlabor View Post
    You can check if the device has a single back button. It it has, it is a Asha 501 or later.

    String nokiakeyboard = System.getProperty("com.nokia.keyboard.type");
    if( (nokiakeyboard != null) && nokiakeyboard.equals("OnekeyBack")){
    // You have Asha UI
    }

    See also
    http://developer.nokia.com/resources...a-devices.html

    Regards

    Karsten Meier
    Thanks for your reply. Unfortunately that doesn't help my case because some UI elements can only work on Asha OS or S40, and your if condition leaves out the Asha 500 which also runs Asha OS. Thanks anyway. If anyone else has any idea that would be helpful, otherwise it looks like I will have to create two separate projects with different UIs.

    Fenix

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,808

    Re: How do you check if a device is Asha or S40 programatically?

    Properties may still help to some extent, there are others too. Check pages like http://developer.nokia.com/community...erties_in_MIDP and http://developer.nokia.com/resources...roperties.html.
    If you provide some details on what kind of differentiation you need, someone may come up with more specific ideas.

Similar Threads

  1. How to check App icon of Asha Web App?
    By SANDEEP SHARMA in forum Nokia Asha Web Apps
    Replies: 3
    Last Post: 2014-04-15, 23:20
  2. Check internet connection speed programatically
    By hansorkrutor in forum Wired and Wireless interfaces (Closed)
    Replies: 2
    Last Post: 2011-06-03, 16:08
  3. programatically how to check if mobile is java enabled?
    By ksmobilejava in forum Mobile Java General
    Replies: 5
    Last Post: 2011-05-06, 11:11
  4. How can I check the GPRS whether available programatically?
    By GFYsweetwood in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2009-04-03, 02:58
  5. Programatically check if Installer is running?
    By markos123 in forum Symbian
    Replies: 2
    Last Post: 2008-11-02, 13:09

Posting Permissions

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