×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    How to identify S60 version?

    Need to know whether my script is run by PyS60 1.4.5 in 5.x device, so that I can setup screen size correctly. Need to set size as "large" to get access to Options menu. Otherwise always "full" to maximize app screen.

    Code:
    S60 version        3.x        5.x
    PyS60 1.4.5        full       large
    PyS60 1.9.5        full       full
    PyS60 1.9.5 manual:

    On devices that don't have Left Soft Key and Right Soft Key (e.g.: Nokia 5800), setting the screen to 'full' will translate to 'large' mode.
    I thought "sysinfo.os_version" would help me identify S60 5.0, but it returns something weird:

    N82: (2, 0, 1540)
    5800: (2, 0, 1804)
    Any ideas what those mean? Any ideas how to identify S60 5.x devices? Too tired to start with touch events this evening, but so far that's the only workaround I can think of...

    Cheers,

    --jouni

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: How to identify S60 version?

    Read the documentation about e32. You'll find the function you're looking for

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: How to identify S60 version?

    Quote Originally Posted by bogdan.galiceanu View Post
    Read the documentation about e32. You'll find the function you're looking for
    Ups, forgot to mention that! Been over, under and through e32, but can't find anything useful.

    s60 version info
    The SDK version with which this Python was compiled (tuple).
    Nokia 5800 gives me "(3,0)", which means that the PyS60 1.4.5 was compiled with SDK 3.0 version. Wasted few hours to debug this, reported a couple defects against 1.9.5 while stumbling around blindly, until I finally woke up enough to check what the bl**dy function actually returns.

    I'm sure there is a valid reason for existence of this function, but I cannot imagine what it is... oh ok, it exists to offer some way to check whether certain SDK dependent features are available or not, but I have never ever seen anyone use it. Happy to have it, just in case. Otherwise I'm positive I'd need it sooner or later.

    I believe sysinfo.sw_version() can be used to identify 5800, but that would be a hardcoded hack. What about future 5.x based devices without keypad

    Almost awake now,

    --jouni baking cakes for birthday

  4. #4
    Nokia Developer Expert
    Join Date
    Apr 2007
    Posts
    131

    Re: How to identify S60 version?

    Starting from PyS60 1.9.5, e32.s60_version_info returns the actual S60 platform version of the device, not the SDK version on which PyS60 was compiled. The same info is present in the 1.9.5 release notes as well as the e32 module documentation.

    ie, on 5800
    Code:
    >>> import e32
    >>> e32.s60_version_info
    (5, 0)
    >>>
    Install the same version of PyS60 on N95 and e32.s60_version_info returns (3, 1), symbolizing that it is 3rdEd FP1 device.
    Code:
    >>> import e32
    >>> e32.s60_version_info
    (3, 1)
    >>>

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: How to identify S60 version?

    Quote Originally Posted by mahesh.sayibabu View Post
    Starting from PyS60 1.9.5, e32.s60_version_info returns the actual S60 platform version of the device, not the SDK version on which PyS60 was compiled.
    Great! However right now I was looking for 1.4.5 solution

    Quote Originally Posted by mahesh.sayibabu View Post
    PyS60 [1.9.5] on N95 and e32.s60_version_info returns (3, 1), symbolizing that it is 3rdEd FP1 device.
    ...hmph, wondering if the platform numbers are now official? That some place really documents that "3rd Edition Feature Pack 1" really equals to "3.1"?



    --jouni

  6. #6
    Nokia Developer Expert
    Join Date
    Apr 2007
    Posts
    131

    Re: How to identify S60 version?

    Quote Originally Posted by JOM View Post
    wondering if the platform numbers are now official? That some place really documents that "3rd Edition Feature Pack 1" really equals to "3.1"?
    --jouni
    Good point. Its always been the convention in PyS60, and e32.s60_version_info documentation can mention this explicitly.

Similar Threads

  1. Python for S60 1.9.5 is now released
    By tvijayan in forum Symbian
    Replies: 8
    Last Post: 2009-05-30, 05:33
  2. Python for S60 1.9.4 is now released
    By tvijayan in forum Symbian
    Replies: 9
    Last Post: 2009-05-27, 10:39
  3. make the background of a custom canvas unedr S60 version 3
    By markchua_99 in forum Mobile Java General
    Replies: 2
    Last Post: 2009-01-21, 01:48
  4. SDK Installation problems (wrong drive) S60 3rd
    By Jeepy in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2007-03-12, 21:59

Posting Permissions

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