×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    UK
    Posts
    35

    Menu Select button using List object

    I'm using implicit List objects for my game's menu system, with either a single 'Exit' or 'Back' Command added.

    On Siemens (MT50) and Nokia (3410,6310i) phones, a Select command is automatically added to the phone's Soft key which is great for 2 soft key phones as it presents the menu as:

    -Sample1-
    Menu 1
    Menu 2
    Exit Select

    However on Motorola phones (v66i,T720), the Select command is not automatically added. I have therefore explicitly added a Select command in the code, which does make it appear on the Motorola phones. Unfortunatley this has the knock on effect of providing 2 Select commands on the Siemens and Nokia phones, giving 3 commands for only 2 softkeys, resulting in an Options softkey which then presents the 2 Select commands on a second screen:

    -Sample2-
    Menu 1
    Menu 2
    Exit Options

    Here's my original sample with just the one Command added in code:

    lstSettings = new List( "Settings", Choice.IMPLICIT );
    lstSettings.append("Game mode",null);
    lstSettings.append("Difficulty",null);
    cmdSettingsBack = new Command("Back", Command.BACK, 1);
    lstSettings.addCommand(cmdSettingsBack);
    lstSettings.setCommandListener(this);

    Here's my amended Motorola sample with two Commands added in code:

    lstSettings = new List( "Settings", Choice.IMPLICIT );
    lstSettings.append("Game mode",null);
    lstSettings.append("Difficulty",null);
    cmdSettingsSelect = new Command("Select", Command.ITEM, 1);
    cmdSettingsBack = new Command("Back", Command.BACK, 2);
    lstSettings.addCommand(cmdSettingsSelect);
    lstSettings.addCommand(cmdSettingsBack);
    lstSettings.setCommandListener(this);

    The last sample is fine on Motorola but always gives me Options followed by 2 Select commands on other phones. I've also tried Command.ITEM, Command.OK, Command.SCREEN with similar results.

    Seems a pity to have a separate Motorola version of my game for this reason alone.

    Are any of you guys having similar problems? Do you use the List object for menus? Or do you some other objects for your menu?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    20

    RE: Menu Select button using List object

    Did you ever find a satisfactory solution to your problem? I've just been rearranging some GUI items and needed a "Select" command and I found also, that Nokia appears to add it's own Select command also.

    But! I think it may depend on the f/w version of your phone. I can't speak for the 3410 but on the 6310i it may be variable. On the version of the emulator that I'm running, the extra Select command is added but I just tested it on my 6310i phone which has a newer version of the firmware (4.75) and this doesn't happen at all. It just adds the application defined Select command.

    cheers, S

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    20

    RE: Menu Select button using List object

    PS: I just checked this issue also on a Nokia Communicator 9290 running version 5.05(2); this version of the device automatically adds a Select command. This is quite troublesome......

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    28

    RE: Menu Select button using List object

    Hi !
    Have you got a solution to this ? I am struggling with similar issue with nokia 7210.. it does not provide select-command, while series 40 concept emulator does that.

    P_

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Irving, Texas, USA
    Posts
    419

    RE: Menu Select button using List object

    Hello,

    You can always try to identify the phones and create the Select or whatever conditional code you need to create (one good example is to not to add you own Exit on Nokia 7650).

    You can use the following code to check the model of a phone:
    int terminal = 0;
    static final int COMMON = 0;
    static final int S30 = 1;
    static final int S40 = 2;
    static final int S60 = 3;
    ...
    // Get the system type
    String strTerminal = System.getProperty("microedition.platform"
    if (strTerminal.indexOf("650&quot>0) terminal = S60;
    if (strTerminal.indexOf("6310&quot>0) terminal = S30;
    if (strTerminal.indexOf("3510&quot>0) terminal = S30;

    and so forth...

    Note: Early versions of Nokia 3410 reported just "j2me", but this has been corrected in later firmware versions.

    Another way to check if it's a Nokia Java phone is to see if one of the Nokia UI classes is present:

    boolean isNokia = false;
    try {
    Class.forName("com.nokia.ui.FullCanvas&quot.getClass();
    isNokia = true;
    }
    catch (ClassNotFoundException cnfe) {}

    The same idea will probably work with other manufacturers' Java phones.

    Regards,

    Petteri / Forum Nokia

Posting Permissions

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