×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    42

    Question My soft Keys of Nokia 6600 are not working for my application

    Hi:- I am developing a mobile application for my Nokia 6600...Using JBuilder 2005 (Wireless Toolkit 2.0)...MIDP 2.0 and CDLC 1.0....the problem is that I have made a splash screen for my application using Canvas..and from there user have to press a softkey for start of Application and other for Exit...The problem is that...the MIDlet is runnig wuite well on JBuilder Emulator...and when I press the soft keys its respond properly..but when I installed that application to my Nokia 6600...then Only the Splash screen is displayed and commands are shown on the screeen but when I press the soft keys no action is performed...i.e. Mobile doesn't show any response....some Important parts of my code are as follows...

    /***************Main MIDLET*/////////////
    public class HomeSecurityMIDlet extends MIDlet implements CommandListener {
    static HomeSecurityMIDlet instance;
    private SplashScreen splash_start;
    private Display main_display = Display.getDisplay(this);
    static final Command ExitCommand = new Command("Exit", Command.EXIT, 1);
    static final Command StartCommand = new Command("Start",Command.OK,0);/*More smaller the number more thr priority*/
    UserControl displayable = new UserControl(this);
    public HomeSecurityMIDlet() {
    instance = this;
    try{
    splash_start = new SplashScreen("Muhammad Ummar Iqbal",
    "Tasawar Gulzar", "Abid Islam");

    /*Initializing the Splash Screen*/
    splash_start.addCommand(ExitCommand);
    splash_start.addCommand(StartCommand);
    splash_start.setCommandListener(this);
    }catch (Exception exp)
    {
    System.err.println("Problem loading image "+exp);
    }

    }

    public void startApp() {
    this.Show_Splash();/*Displays the Splash Screen*/

    //main_display.setCurrent(displayable);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public static void quitApp() {
    instance.destroyApp(true);
    instance.notifyDestroyed();
    instance = null;
    }

    public void Show_Splash(){
    main_display.setCurrent(splash_start);
    }

    public void commandAction(Command c, Displayable s)
    {
    if (c.getCommandType( ) == Command.EXIT)
    {
    destroyApp(true);
    notifyDestroyed( );
    }
    if(c.getCommandType() == Command.OK)/*If Ok Button is pressed*/
    {
    splash_start.move_banner_thread = null;/*Stop the Moving Names Thread*/
    main_display.setCurrent(displayable);
    }
    }

    }

    /*******************************************************/
    /*********************Splash screen Class*****************/
    public class SplashScreen extends Canvas implements Runnable {
    public SplashScreen() {
    try {
    jbInit();
    } catch (Exception ex) {
    ex.printStackTrace();
    }
    }
    public Thread move_banner_thread = new Thread(this);/*Moving Names Thread*/
    private String mem1,mem2,mem3 ;/*Variable to store the names of Group Members*/
    private String combined_mem;
    public SplashScreen(String mem_1,String mem_2,String mem_3) {
    mem1 = mem_1;
    mem2 = mem_2;
    mem3 = mem_3;/*Names of Group Members*/
    combined_mem = new String(mem1+","+mem2+","+mem3+" ");
    move_banner_thread.start();/*Starts the Thread*/
    this.setFullScreenMode(true);/*Make the Full Screen Mode*/
    }

    /**
    * paint
    *
    * @param graphics Graphics
    * @todo Implement this javax.microedition.lcdui.Canvas method
    */
    protected void paint(Graphics graphics) {
    /*First of all getting Screen Hight and Width*/
    int height = this.getHeight();
    int width = this.getWidth();/*Get the Height and Width of Canvas*/
    // Set the new Colour of Screen
    graphics.setColor(60,100,90);
    graphics.fillRect(0, 0, width, height);
    /*Now setting the font*/
    graphics.setFont(Font.getFont(Font.FACE_PROPORTIONAL,Font.STYLE_BOLD,Font.SIZE_LARGE));
    int centerX = width / 2;
    int centerY = height / 2;
    graphics.setColor(255,255,255); // white
    drawText(graphics, centerX, centerY - 1);
    drawText(graphics, centerX, centerY + 1);
    drawText(graphics, centerX - 1, centerY);
    drawText(graphics, centerX + 1, centerY);
    graphics.setColor(0,0,0); // black
    drawText(graphics, centerX, centerY);
    this.drawText(graphics,centerX,centerY);
    /*Now giving Effect on screen*/
    /*Moving Banner of Names*/
    graphics.drawString(combined_mem,0,centerY+60,Graphics.HCENTER | Graphics.TOP);
    // graphics.setFont(Font.getFont(Font.FACE_PROPORTIONAL,Font.STYLE_BOLD,Font.SIZE_MEDIUM));


    }

    private void drawText(Graphics g,int x,int y) {
    int fontHeight = g.getFont().getHeight();
    int textHeight = 3 * fontHeight;
    int topY = y - textHeight / 2;
    /*Drawing the Text with the required Properties*/
    g.drawString("Home Security",x,topY,Graphics.HCENTER | Graphics.TOP);
    g.drawString("&",x,topY + fontHeight,Graphics.HCENTER | Graphics.TOP);
    g.drawString("Control System",x,topY + 2 * fontHeight,
    Graphics.HCENTER | Graphics.TOP);
    g.drawString("By",x,topY + 3 * fontHeight,
    Graphics.HCENTER | Graphics.TOP);
    }

    public void run(){
    /*Override run function*/
    int centerX = getWidth()/2;
    int centerY = getHeight()/2;/*Center point of screen is centerX,centerY*/
    for(;{
    try{
    this.repaint(0, centerY + 50, getWidth(),
    getHeight() - (centerY + 50));
    /*repaints a specific region*/
    Thread.sleep(250);/*Halt the Execution of this Thread*/
    char ch = combined_mem.charAt(0);
    combined_mem = combined_mem.substring(1,combined_mem.length());/*Trim the first Char*/
    combined_mem += ch;/*Put the Trimed Char at the End*/
    }catch(InterruptedException ie){
    System.err.print(ie);/*Whats is the Exception*/
    }
    }
    }

    private void jbInit() throws Exception {
    }
    }
    /************************end******************************/


    Please help me anybody as soon as possible and i am looking forward for help from any Nokia Expert....any solution or any suggestion...any possible reason of error....
    Thanks....

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    42

    Red face Re: My soft Keys of Nokia 6600 are not working for my application

    Please anybody who have any knowledge please help me...as soon as possible...
    Muhammad Ummar Iqbal Bhutta
    Student (Computer Engineering)
    University of Engineering and Technology Lahore

  3. #3
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: My soft Keys of Nokia 6600 are not working for my application

    Code:
     public void commandAction(Command c, Displayable s)
    {
    if (c.getCommandType( ) == Command.EXIT)
    {
    destroyApp(true);
    notifyDestroyed( );
    }
    if(c.getCommandType() == Command.OK)/*If Ok Button is pressed*/
    {
    splash_start.move_banner_thread = null;/*Stop the Moving Names Thread*/
    main_display.setCurrent(displayable);
    }
    }
    
    }
    Actually, what you should be doing is:

    Code:
     public void commandAction(Command c, Displayable s)
    {
    if (c == ExitCommand)
    {
    destroyApp(true);
    notifyDestroyed( );
    }
    if(c == StartCommand)
    {
    splash_start.move_banner_thread = null;/*Stop the Moving Names Thread*/
    main_display.setCurrent(displayable);
    }
    }
    
    }
    There are some issues with commands in 6600, but I think in this case it's a code problem. However I still advise you to look for the Technical Library docs in Forum Nokia and check all the known issues to make sure they're not affecting your app.

    Daniel

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    42

    Re: My soft Keys of Nokia 6600 are not working for my application

    Thanks sir for all that but one thing that I think that there is no problem with code as the same code is running very well on Nokia 6680....However I will try ur code in My Nokia 6600 and will let u know...Thanks for all ur help...
    Muhammad Ummar Iqbal Bhutta
    Student (Computer Engineering)
    University of Engineering and Technology Lahore

  5. #5
    Registered User
    Join Date
    Mar 2006
    Posts
    42

    Re: My soft Keys of Nokia 6600 are not working for my application

    Hy dcrocha! Sir I have tried ur code but it is not working also....what is problem with Nokia 6600.??? any further Suggestions....Please help me as soon as possible..

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    42

    Re: My soft Keys of Nokia 6600 are not working for my application

    Hay I have just got the Solution....and I am posting it here because it may help some one...Nokia 6600 Doesn't respond to Commands when any canvas is Displayed in Full Screen Mode..i.e. setFullScreenMode(true)...The Only Solution for this problem is to Update the Software of Nokia 6600 to Version 4.09.1...
    Thanx..
    Muhammad Ummar Iqbal Bhutta
    Student (Computer Engineering)
    University of Engineering and Technology Lahore

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: My soft Keys of Nokia 6600 are not working for my application

    Hi Muhammad Ummar Iqbal Bhutta,

    You should follow Daniel's advice and take a look at the doc below:

    Known Issues In The Nokia 6600 MIDP 2.0 Implementation v1.7
    http://www.forum.nokia.com/info/sw.n..._7_en.pdf.html

    Nokia 6600 has a lot of known issues...

    BR

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58
  2. How to curupt Messaging Application present in Nokia 6600
    By amitkumar_j2me in forum General Development Questions
    Replies: 3
    Last Post: 2005-11-27, 20:21
  3. Nokia 6600: midlet bluetooth-enabled applications don't work
    By pracucci in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-11-15, 16:04
  4. Nokia 6600 Application closed
    By ollympo in forum Symbian
    Replies: 1
    Last Post: 2004-02-02, 03:29
  5. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

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