×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    3

    Running an application in the background

    Hi guys,

    I was wondering if it is possible to run a java application in the background like a process.
    We have developed an application that receives data from an external device using Bluetooth. We would like to have this app running so that transmission is done without the user having to intervene at all.
    Is this possible with the S40 and/or S60 phones?

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

    Re: Running an application in the background

    Hey bolfo,

    Welcome to the forum nokia discussion boards.....

    3


    to set a j2me app to the background use the following in your midlet class:

    Display.getDisplay (this).setCurrent (null);

    to get the screen back use the following:

    Display.getDisplay (this).setCurrent (myCanvas);

    Where myCanvas is your canvas instantiation

    R

    You can still use a thread or timer to do things in the background while your midlet is hidden.

    This does not work on all models. Works on Nokia s60, SonyEricsson, but only on latest Nokia device of s40.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

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

    Re: Running an application in the background

    Quote Originally Posted by bolfo View Post
    Hi guys,

    I was wondering if it is possible to run a java application in the background like a process.
    We have developed an application that receives data from an external device using Bluetooth. We would like to have this app running so that transmission is done without the user having to intervene at all.
    Is this possible with the S40 and/or S60 phones?
    Try -

    Nokia-MIDlet-bg-server

    Series 40 5th edition FP 1 ( where Display.getDisplay (this).setCurrent (null); may not work)

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

    Example:
    Add Nokia-MIDlet-bg-server: 1 in your application JAD file to tell the AMS on the device that its a background application that does not require any user intervene or UI Display.

    Also see other S40 background app related JAD properties on http://library.forum.nokia.com/topic...E4A538FB8.html to set more control on your background running apps.
    Thanks,
    Ekta

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

    Re: Running an application in the background

    Hi guys,
    Thank you for your help.
    A few additional questions:
    - it works only on the latest s40 devices: how can we check if a device is compatible or not?
    - if we get things to work this way, the software would still need to be initiated by the user every time the phone is turned off and on again, right?

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

    Re: Running an application in the background

    Quote Originally Posted by bolfo View Post
    Hi guys,
    - if we get things to work this way, the software would still need to be initiated by the user every time the phone is turned off and on again, right?
    See the link I gave before -- Nokia-MIDlet-auto-start can be used to launch the app again on device restart.

    - it works only on the latest s40 devices: how can we check if a device is compatible or not?
    it works on device which are Series 40 5th edition FP 1 onwards, you need to have multiple builds of your application on OTA server which needs to identify the requesting device by UserAgent header and gives the relevant build to the device depending on its capabilities.
    Last edited by ektasrv; 2010-06-21 at 07:56.
    Thanks,
    Ekta

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

    Re: Running an application in the background

    ok thank you ektasrv, we will be looking in to it.
    Thanks again for your kind help.

Similar Threads

  1. Running application in background
    By pinkhardlionel in forum Symbian
    Replies: 10
    Last Post: 2009-08-10, 15:01
  2. Running a background application.
    By arul_nokia in forum Mobile Java General
    Replies: 5
    Last Post: 2009-03-23, 12:55
  3. Running an application in background
    By kannabiran.krish in forum Symbian
    Replies: 8
    Last Post: 2007-08-20, 07:37
  4. running an application in background
    By rishabht in forum Symbian
    Replies: 4
    Last Post: 2006-12-26, 11:22
  5. Running application in the background
    By artemg in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-05, 12:54

Posting Permissions

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