×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Lightbulb Hiding the existing UI

    Can we do Display.getDisplay(MIDlet).setCurrent(null) after Display.getDisplay(MIDlet).setCurrent(Form) in j2me.

    I have an app having UI(a form), then i want to set it to background to listen for an incoming sms on a specific port.

    for example:
    Display objDisp = Display.getDisplay(midlet);
    objDisp.setCurrent(form);
    try {
    Thread.sleep(5000);
    System.out.println("now running in background");
    objDisp.setCurrent(null);

    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    this code is not working.. please help me..
    Thanks for help
    regards
    Gaurav

  2. #2
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Re: Hiding the existing UI

    if there is any alternate way to do this, please let me know...

  3. #3
    Regular Contributor
    Join Date
    Mar 2011
    Location
    Pune,Maharashtra,India
    Posts
    92

    Re: Hiding the existing UI

    Quote Originally Posted by gauravwable View Post
    Can we do Display.getDisplay(MIDlet).setCurrent(null) after Display.getDisplay(MIDlet).setCurrent(Form) in j2me.

    I have an app having UI(a form), then i want to set it to background to listen for an incoming sms on a specific port.

    for example:
    Display objDisp = Display.getDisplay(midlet);
    objDisp.setCurrent(form);
    try {
    Thread.sleep(5000);
    System.out.println("now running in background");
    objDisp.setCurrent(null);

    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    this code is not working.. please help me..
    Thanks for help
    regards
    Gaurav
    On which device you are trying this task?

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Hiding the existing UI

    Hello,

    if this is related to Series 40 platform then unfortunately the described functionality (running a MIDlet on background) cannot be achieved by using Display.setCurrent(Displayable) due to this limitation:

    On Symbian, The call setCurrent(null) sends the MIDlet to the background. On Series 40, setCurrent(null) does nothing as the platform does not support Java application multitasking for normal MIDlets.

    Source: Java Developer's Library 3.10 > Developer's guides > UI and graphics > LCDUI > LCDUI overview > Interplay with Application Management Software

    http://library.developer.nokia.com/i...6944B473F.html

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

Similar Threads

  1. Hiding SMS from Inbox
    By sanderph in forum Symbian
    Replies: 4
    Last Post: 2010-01-31, 18:06
  2. Hiding container
    By swapnil_mahajan in forum Symbian
    Replies: 5
    Last Post: 2009-04-16, 12:32
  3. Hiding tab
    By kumarkkk in forum Symbian
    Replies: 2
    Last Post: 2009-03-25, 07:47
  4. Hiding app from app manager
    By vniles in forum Symbian
    Replies: 2
    Last Post: 2007-05-28, 14:26

Posting Permissions

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