×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    NokiaUI on non-Nokia S60 phones

    Is NokiaUI always included on non-Nokia S60 phones?

    If it's a matter of using the S60 Java Runtime, do all S60 phones use it? Does it matter if it's pre S60.3.2 or not? (As I understand the JRT is considered a separate element starting from that edition).

    SE have long been implementing NokiaUI in their JP platform so it'd be expected to see it in their S60 too (some of the new U* models), but I was surprised to find out, on a very cursory remote test, that Samsung GT-i7110 includes it too.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: NokiaUI on non-Nokia S60 phones

    All Nokia Series 40 and Series 60 devices support the Nokia UI API. However, there are several different versions, so the features supported are not identical in all devices. For example, S60 5th includes support for creating a Font object based on a point-size, rather than just small, medium or large. This is a newer feature of the Nokia UI API (1.2 and later), so it doesn't exist on Series 40s or earlier Series 60s.

    Non-Nokia Series 60s usually have the Nokia API too, and that includes Sony Ericsson and Samsung S60s. As you say, Sony Ericsson "JP" devices, from JP2 onwards, also have the Nokia UI API. I don't think the Siemens SX-1 has the Nokia UI API, though I have some documentation that says I'm wrong.

    As a rule, I'd recommend you avoid using the Nokia API, and it makes porting more difficult.

    Graham.

  3. #3
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: NokiaUI on non-Nokia S60 phones

    Should this be something that can be checked programatically by looking for certain "java_build_version"s in "microedition.platform", or is it not necessarily related?

    You said you have some documentation related to that, is it Siemens-specific or general? Do you know of any official specs regarding that in Samsung and SE phones?

    Yes, it's better to avoid non-standard APIs for cross platform compatibility, but some things can't be done otherwise. E.g., backlight control is still limited in MIDP. For S60-specific builds there's no harm in using it, and if that applies also to Samsung and SE, all the better.

    As you said, Nokia refreshed it recently in S60.5/JRT 1.3, so it still seems alive and well.

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: NokiaUI on non-Nokia S60 phones

    In 1.2 and later, you can get information using system properties (System.getProperty()), such as "com.nokia.mid.ui.version". Check the Java Docs for the other properties.

    You can also use:

    Code:
    boolean supportsNokiaAPI;
    try {
        Class.forName("com.nokia.mid.ui.DirectUtils");
        supportsNokiaAPI = true;
    } catch (ClassNotFoundException e) {
        supportsNokiaAPI = false;
    }
    This doesn't work on a small number of very early firmware, 1st Edition Series 40 devices, but should work on everything else.

    The system properties are useful if you need to check for a version-specific method rather than a class. For example, DirectUtils acquired the getFont() method in 1.2.

    You might want to read this article, which describes a technique for safely using an API that might not exist on the target device. You need to be careful not to reference any Nokia API classes from any loaded class on devices that don't have the Nokia API.

    Graham.

  5. #5
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: NokiaUI on non-Nokia S60 phones

    I recall Class.forName() failed on some VMs (I think it was Motorola, but could be others too), but it may be worth a shot in this case.

    Nevertheless I think I'll try to find some official specs that say NokiaUI.

    Thanks for the help.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    ehudshapira, from my experience with a lot of obscure KMVs, Class.forName is extremely safe, especially in this case because you do not face that problem because you load a class which does exist on those products affected.
    Last edited by traud; 2010-03-14 at 22:01.

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: NokiaUI on non-Nokia S60 phones

    Quote Originally Posted by traud View Post
    Class.forName is extremely safe
    That's my experience too. I'd rely on forName() for determining if a device has a particular API, more than I'd trust the manufacturers' specifications. I've routinely used this technique for device profiling.

    The problem I mentioned on early S40s affects only a small number of very early firmware 7210s. I've never seen a problem on a Motorola, though I wouldn't be surprised if you've had problems with the T720.

    Graham.

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    grahamhughes, perhaps the community could built a complete list.

    Early Motorola had the same issue, namely the Accompli 008 – because they used the same KVM in the same wrong way as Nokia did. Another candidate is Nokia 6310i even with latest firmware. Just used it to get the exact wording of the throwable message and to feed the search engine. However, that one has NokiaUI, too. Consequently, it is no problem to ehudshapira either.

  9. #9
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: NokiaUI on non-Nokia S60 phones

    Ah, that makes sense. I've never worked on the 6310i, but I think it pre-dates the 7210, so is presumably where the 7210 inherited the bug from. Never used the 008 either... if I remember right, it's a monochrome, touch-screen device? Pre-dates the T720. I don't know if the T720 had the issue, but then the T720 had so many issues it would be hard to tell.

    With the possible exception of the (apparently indestructable) 6310i, there can't be many of these handsets still around. 6310i, I think, has a 30k JAR size limit, in which case Class.forName() is the least of your worries.

    Ahh... yes, there is another Motorola. V690 apparently always throws a ClassNotFoundException. Of course, in this situation, that would be the correct result anyway. Surprisingly, this is a MIDP-2 device, but a very old one (2003). I don't think this device was ever sold in Europe; I've never seen one. It's a 128x160 flip phone. I wouldn't be surprised if some other Motos share that implementation (T730?)

    Graham.

Similar Threads

  1. ###Upgrading Firmware###
    By zahid44 in forum General Development Questions
    Replies: 27
    Last Post: 2008-10-21, 07:17
  2. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16

Posting Permissions

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