×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    14

    How can I put a java programm in the backgroung on Nokia 2710?

    Hello,

    I have problem on my Nokia 2710:
    I'am running a Java-program and it works fine.
    Now I want to put the program in the background (dont leave!) to do something else with the phone, but I don't know how.
    How can I enter the menue? Is there a trick?

    The program which I'am running is self-developed, but the problem occurs on any Java-program.
    In my program there is a menu point "->Background" which put the program in the background on most devices (e.g. Nokia 6210) but not on Nokia 2710!
    The call I use to do this is the following:
    display.setCurrent(null);

    It's not necessary for me to put the programm to backgroung by program, it would be sufficient if there is a possibilty to do it manually.

    Who can help?

    Best regards
    Uwe Krause
    Last edited by gutesoftware_krause; 2010-06-10 at 09:55.

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    That one should work, but I have to admit that my knowledge regarding the newer S40 devices (6th) edition is pretty limited.
    I do seem to remember though that multitasking should be supported on that platform, and the only way we accomplished that on the S60 platform was exactly that setCurrent(null) call...

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by gutesoftware_krause View Post
    Hello,

    I have problem on my Nokia 2710:
    I'am running a Java-program and it works fine.
    Now I want to put the program in the background (dont leave!) to do something else with the phone, but I don't know how.
    How can I enter the menue? Is there a trick?

    The program which I'am running is self-developed, but the problem occurs on any Java-program.
    In my program there is a menu point "->Background" which put the program in the background on most devices (e.g. Nokia 6210) but not on Nokia 2710!
    The call I use to do this is the following:
    display.setCurrent(null);

    It's not necessary for me to put the programm to backgroung by program, it would be sufficient if there is a possibilty to do it manually.

    Who can help?

    Best regards
    Uwe Krause
    display.setCurrent(null); will not work

    You need to set - Nokia-MIDlet-bg-server : 1 in the JAD file to make your application run in background.

    Series 40 5th edition FP 1 and onwards

    Indicates MIDlet-n in the suite that is a BG server.

    Example:

    Nokia-MIDlet-bg-server: 1
    Thanks,
    Ekta

  4. #4
    Registered User
    Join Date
    Jun 2010
    Posts
    14

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by ektasrv View Post
    Nokia-MIDlet-bg-server: 1
    After inserting this, the program can't be installed anymore.

    I also think you misunderstood my problem:
    The program should not be a permanent background programm.
    The programm has to work in foreground and I only want to put it to background when I want to do something else with the phone.
    Maybe be code or with pressing any key or key combination.

  5. #5
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Refer to this link
    http://discussion.forum.nokia.com/fo...round&p=744321

    You can devide your application in 2 parts, one which you want to run in foreground other which you want to run in bacxkground to do some services.... and interact between them.
    Thanks,
    Ekta

  6. #6
    Registered User
    Join Date
    Jun 2010
    Posts
    14

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    @ektasrv
    I thinks this is very difficult.

    I only want to put my program in background, make a call or take a look at the calendar, and then go back to program.
    A very simple thing, if this is not possible with the 2710, then I have to trash it.

    @all
    Does anyone has a simple solution?

    Thanks
    Uwe Krause

  7. #7
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by gutesoftware_krause View Post
    @ektasrv
    I thinks this is very difficult.

    I only want to put my program in background, make a call or take a look at the calendar, and then go back to program.


    Thanks
    Uwe Krause
    For making a call, you just need to do a platform request from your application it will do the required thing automatically.
    Thanks,
    Ekta

  8. #8
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    I think he meant that as an example, he also might want to start another app, or surf the web, or listen to his music, or check his appointments and so on...
    And no there is no simple solution, the whole multi-tasking thingie is pretty new on the S40, those are feature phones which aren't the most technically advanced devices...

  9. #9
    Registered User
    Join Date
    Jun 2010
    Posts
    14

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by ektasrv View Post
    For making a call, you just need to do a platform request from your application it will do the required thing automatically.
    How can I do such platform requests?

    Thanks
    Uwe Krause

  10. #10
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by gutesoftware_krause View Post
    How can I do such platform requests?

    Thanks
    Uwe Krause
    Try this code.

    private void call(String number) {
    try {
    platformRequest("tel:" + number);
    } catch (ConnectionNotFoundException ex) {
    // TODO: Exception handling
    }
    }

    You have to use the MIDLet referecne in order to call that method
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  11. #11
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    It should be this.platformRequest("tel:" + number); from the Midlet, where this stands for the instance of the midlet itself.
    Thanks,
    Ekta

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

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    You should always check the return value from platformRequest(), since you may need to exit before the requested action takes place, depending on device.

    Code:
    if (platformRequest(url)) {
        notifyDestroyed();
    }
    Graham.

  13. #13
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Quote Originally Posted by Tiger79 View Post
    I think he meant that as an example, he also might want to start another app, or surf the web, or listen to his music, or check his appointments and so on...
    And no there is no simple solution, the whole multi-tasking thingie is pretty new on the S40, those are feature phones which aren't the most technically advanced devices...
    I have the 6720, and want to do this on my phone. Is this called "pausing" the application?

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

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    Hello ksadil,

    Nokia 6720 classic is a S60 3rd Edition, Feature Pack 2 device i.e. a multi-tasking smartphone which means that the device can run multiple applications and, accordingly, tasks simultaneously.

    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]

  15. #15
    Registered User
    Join Date
    Oct 2007
    Posts
    17

    Re: How can I put a java programm in the backgroung on Nokia 2710?

    OK, but I want to have an itemcommand with a label that says "Hide", and when the user selects this itemcommand I want my program to no longer be shown on the display, but I want to be able to go back to it by using the "show open apps" menu command in the phones menu.

Similar Threads

  1. send AT-commands via Bluetooth with Java programm
    By zhchinde in forum Mobile Java General
    Replies: 19
    Last Post: 2008-07-19, 16:59
  2. need a java programm
    By Lazybone88 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2007-06-15, 09:58
  3. Problem installing Java-Programm via IR
    By tklabor in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2006-06-30, 07:44
  4. Nokia 3650 Backgroung changing
    By 00761 in forum General Development Questions
    Replies: 1
    Last Post: 2003-04-13, 20:35
  5. Java Programm to send SMS
    By Nokia_Archive in forum Mobile Java General
    Replies: 2
    Last Post: 2002-05-24, 14:57

Posting Permissions

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