Why auto start application must check ApplicationManager.inStartup

Hello, we have an application, and we check whether the device is in the boot process. Our application sleep and check again if inStartup returns true and it would move forward only when inStartup is set to false.

The code is copied from a tutorial of this forum and this is how:

while (appManager.inStartup())
{
    try
    {
        Thread.sleep(500);
    }
    catch (Throwable error)
    {
        error.printStackTrace();
        // nothing
        logger.error("Got error during waiting for starting up for throwable "
                + error.getMessage());
    }
}

I think it's necessary for a process to screen lanuch a GUI. However for the background process, looks to me that this is not necessary since the OS already started the process for our application. I just changed my code without waiting here and my background process starts correctly. However the API doc http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/system/ApplicationManager.html..., he says the following to the inStartup method:

===============

Determines whether the device is in the boot process. At the start, all threads should hang so that the boot process to move on to the next layer of startup.

===============

He said that all threads should hang during startup. Am I missing sth here? Thanks for any idea about it.

I'm not 100% sure of what th8s means either, but I guess you run level 7 (which you will if you haven't changed it, and this is the last layer, then you're probably OK.

That said, I would always run not really any startup code until appManager.inStartup () is false.

I prefer the approach used in this article to the waiting loop too:

http://supportforums.BlackBerry.com/T5/Java-development/write-safe-initialization-code/Ta-p/444795

Tags: BlackBerry Developers

Similar Questions

  • Auto Start Application

    Hi all

    I'm new to the blackberry development...
    I need launch an application with user interface when bb starts.
    I try with JDE (check auto start) and the start of the application, but not in the foreground, and I need that.
    It is possible to do?
    I read a lot of post on this subject, but none of the works of the solutions.
    Many thanks for the help and sorry for my English

    This is an easy way to do it:

    ApplicationManager app = ApplicationManager.getApplicationManager ();
    KeepGoing Boolean = true;
    so that {(keepGoing)
    If (app.inStartup ()) {}
    try {}
    Thread.Sleep (1000);
    } catch (Exception e) {}
    }
    } else {}
    keepGoing = false;
    }
    }

    UiApplication.getUiApplication () .requestForeground ();

  • The disadvantages to disable auto-start application for CC?

    With Dropbox, creative cloud, my AV program and still more things, my laptop takes forever to start. so I disabled most of the programs in the Task Manager auto-start options. I was wondering, are there downsides to that creative cloud program starts not with Windows? I knoe I'll start when I intend to use Typekit Fonts and only in this way, it won't automatically check updates. But apart from that, is there something that I should now before you disable auto-start for the application of CC?

    Nothing to consider since you already know the functions online. As a noisy fan he has hurt to turn it off.

    Mylenium

  • The auto-start applications and memory of the phone...?

    I was wondering if there is a way to push off the loading application autostart until after the SD card / memory Store is available. I'm having a problem with an app that I developed, forcing some users to enter a code of activation before the trial period is over. I did a class that writes debugging information on the SD card for users to send it to me, so I can see where the failure occurs. Well, it seems that the card SD is not available when you start, is it true that weel to store memory? If so, is there a way around it?

    Our application written in memory of camera store and enabled auto-start. First thing that is written to the log file is not at the beginning of the start feature, the still saw issues with our log file. At least, it seems that the storage is on front of network connection. If you still have the problem of storage, you could extend peterof idea and write to the file using some proxy in the buffer until the storage is available.

  • Auto-start applications BB10

    Hello

    When the device is started I want to autostart My App.

    1. In what setting on the device, I can set the automatic start-up of applications?
    2. How do I program the app that it is started automatically?

    Kind regards

    Hello

    I played a bit with the sample app http://developer.blackberry.com/native/sampleapps/ headless. It seems that when you run an application without head and do not close it manually in the app Manager app is started automatically when you restart the device.

  • Why is-Web application server on a target at a distance in real time is not start?

    Hi, I need help urgent please

    I was wondering why the Web application server on a target at a distance in real time is not start?

    The target is 9014 real-time and its connected to a local network abroad, I have a public IP address port forwarded to the local IP address of the device (Network Address Translation) with all open TCP/UDP ports. I can log on remotely over the internet using the public IP address to the device configuration page and change many settings. Whenever I have activate the Server Web applications and made port 8080, worth defaults to 0 after the reboot of the target.

    The admin login I use has all permissions to control the unit.

    For this reason, I have a problem, deploy web services remotely through the project after building it as it happens with the following error.

    "Web Services deployment failed. You must start the application Web server OR before you deploy a web service.

     

    I have attached a few screenshots

     

    Thanks for the help

    I had someone to plug his laptop to the same network as the cRIO, logmein used to connect remotely to the laptop, I had to download labview and the software needed for the cRIO in the computer, and then with the help of MAX, I reinstalled the software on the cRIO. The port of the web server application 8080 is now activated and I was able to deploy services web ok.

    I wonder why I can't use MAX distance to reinstall the software on the cRIO.

    The cRIO is installed on a private overseas network (192.x.x.x), then I have a public internet IP address (67.x.x.x) mapped to the private IP address of the cRIO (Network Address Translation). I can connect to the cRIO config page using the address 67.x.x.x, but not via MAX

    If I find target real tiem using the Ip address of 67.x.x.x, sometimes with the private static IP (192.x.x.x) located on the cRIO but it shows disconnected status

    I wonder if someone has an idea how to go about using MAX to reach the target in real time on the internet

    Thank you

  • New application guard auto starting annoying

    I am new user of Win 7 & I have loaded down the new sat nav App why it auto start whenever I start its very annoying as I close again

    Unless they are trying deliberately to annoy they put an option in its parameters to toggle start with Windows.

    You can also watch here for applications that run at startup [but there are other ways to achieve this startup that are not so easy to find]:

    C:\ProgramData\Microsoft\Windows\Start menu 1

    2 C:\Users\yourusername\AppData\Roaming\Microsoft\Windows\Start Menu

    3 the application can use an entry in MSConfig, but disabling that would almost certainly it inhibits when you decided to start - you re - activate the entry in MSConfig and restart if you want to use the application.  To have a peek without necessarily changing anything, type msconfig in the search box on the start menu, right-click on the shortcut that is offered & select run as administrator.  Then take a look at the Start to see the applications tab & supporting utilities that run when you start.  Click Cancel when you are finished looking - incorrectly change MSConfig settings may disable your entire PC.

  • Whenever I start one of the applications, it checks the certificate into the internet. If I'm not connected to the internet (including happans quite often), I can't work. Is there a way to get around this?

    Whenever I start one of the applications, it checks the certificate into the internet. If I'm not connected to the internet (including happans quite often), I can't work. Is there a way to get around this?

    Always the same?

    It is important to activate the hidden files and folders view.

    Most of the SLCache material will be too, hidden by default and the program data folder.

    Open the C: drive.

    N ° 1)

    Go to C: > Program Data > Adobe.

    Open the Adobe folder and locate the folder named SLStore.

    Rename SLStore old SLStore.


    Step 2)

    Navigate to C: > Program Files common files > Adobe.

    Under Common Files > Adobe, find the folder named SLCache.

    SLCache open folder and all its contents to the backup on the desktop folder.  You must create a backup manually and move the content of SLCache.

    Note : make sure SLCache is empty.

    Then launch installed apps CC and identify yourself.

    Once you have signed and launched the application.

    Quit and restart and check.

  • Toshiba 32L 4363: missing DLNA + video auto-start

    Hello

    I have some problems with my new Toshiba 32L 4363.
    As I have read on the homepage L 32, 4363 should support DLNA, but I can't find the function.
    Where can I find it?

    There are a few pages where I see a lot of applications to play videos, pages like YouTube.
    The problem is that some of these apps are starting to play even if I hadn't started the app apps start automatically. How can I disable this?

    Videos from a USB USB also begins to play when I chose the videos in a small windows on the right side, but did not press on enter on the remote control.
    I don't like this feature. How can I disable it?

    In the manual (also the web - the toshiba manual - om .net) I couldn't find anything about it.

    mellimelli

    According to the specifications of the TV, the device is DLNA certified.
    This means that you can share movies, videos, music and photos on your TV Toshiba or with DLNA using a DLNA certified media server on your network home.

    I recommend checking the manual start of the user to page 45

    The TV can be configured as a digital media renderer (DMR).
    When using as a media converter, the TV displays content provided by a multimedia server.
    The media selection is made by the media controller.
    The TV can play photo, movie, or audio files when using as a Media Converter.
    In the network menu, select Network Device Setup and press OK.
    Select Media Renderer and press b to select on.
    If demand media controller, prompt and the function of Media Converter will start.

    According to the USB Autostart support: what is mentioned on page 61
    When Auto-start is enabled, you will be asked if you want to start the media player each time that a
    Peripheral USB is inserted. If autostart is disabled (or if you want to connect to a media server on the network), you must manually start the Media Player menu.

    To change the auto-start setting: highlight the Options icon and then select Configuration of Media Player
    and press OK. Select USB Auto Start, and then press OK. You can then select enabled or disabled.

    Start_ sent
    Insert a USB device into the USB port on the left side of the TV. A prompt is displayed. Select Yes, then press OK. Videos, music or Photos and click OK. Then select devices and press OK.

    * NOTE: * If autostart is set to Off, you can manually start the media player.

  • Help! Has made the Creative Cloud 2015 update and it started as a trial version? Monthly payment has been subscribed, why he started out as a trial subscription? I turned off my computer and turned on, and the creative cloud everything has been deleted! I

    Help! The creative cloud from 2015 to day and it started as a trial version? My monthly payment was agreed, why he started out as a trial version? When I turned off my Mac and it went across Creative cloud was gone! Please help me as I have a business to run and I do NOT see support for this phone!

    Hello Jane,.

    I checked your ID Adobe given on the forums, I am unable to find any subscription purchased on this e-mail.

    Is there another email associated with your purchase?

    Please follow the steps in the link using your Adobe Id, which you bought the subscription:

    Connect and disconnect activate Cloud Creative applications

    Please let us know if there is no more need help.

    Concerning

    Bianka Attre

  • Why pictures start automatically on reboot? I never use it and it does not appear in the startup folder.

    Why photos starts automatically when you restart. It is NOT in the folder.so of starting, why what is happening? I never use photos, so it's a loss of memory perfectly!

    Perhaps you have a device with linked images that attempts to import Photos?

    Also where the startup folder did you check?

  • Why FF6.0.2 always check compatibility when opened and opened 2 tabs - firefox page and home page? Is there a way to disable? This is quite annoying

    Why FF6.0.2 always check compatibility when opened and opened 2 tabs - firefox page and home page? Is there a way to disable? This is quite annoying

    See the following for a few suggestions:

  • Is it possible to get Win 7 auto start VPN connection?

    Hey all,.

    Is it possible to get Windows 7 auto start VPN connection? Or can you recommend a 3rd party VPN client application?

    Thank you

    Hello

    You can make a batch file exe or cmd and autostart. The command line should be like this:

    RASPHONE d * where is * a name of your VPN connection

    For example: your Vpn connection is called my VPN

    The command line will be:

    RASPHONE d my VPN

  • Word, Excel and Chrome all auto start to connect on my macbook pro.  I don't want these programs to autostart.  How to disable that?

    When I connect to my macbook pro, Word, Excel and Chrome all automatically load and the beginning and they are VERY slow and slow accessability to something else after I have connection.  I don't want one of these auto-start.  I'll start them if I need them.  I looked on the application's preferences, but also Apple settings and can not find any place to turn off this action.  I don't have this box controlled displays for office ("start connecting").  Any help to stop this would be appreciated.  Using the latest version of El Capitan. Thank you

    Do not simply close their windows. Choose EXIT their menus. If they were all off at the stop, they should not re-launch at startup.

    But if you simply close they windows, they are still worn running. next time you start, it will be open again.

  • Z600 workstation: workstation Z600 not auto start after power loss

    I use a HP Z600 workstation.

    BIOS version

    786 G 4 V0.3.54

    OS is duel boot Windows 7 Professional 64 - bit Ubuntu & 14.04LTS

    Using Setup F10 I have:

    1. active Advanced-> Bios Power On for all days of the week and took one hour for power on

    2. under Advanced-> Device Options, I enabled wake on lan

    3. under advanced-> power on-> Options after the loss of power, I put the option "always on."

    If push the power on button on the front of the machine, it auto starts with Linux.

    If I pull the plug, the machine switches off immediately.

    If I plug the machine in, nothing DON'T get PAST!

    It lights up. I have to press the button.

    If I unplug the machine and then plug it in and wait for the moment Pwoer of BIOS on, do NOT start machine or turn on at the set time. Again, I must press the button to turn it on.

    What I'm missing or doing wrong. The machine is used as a remote server. It should restart automatically after a power loss.

    Any help would be greatly appreciated.

    Nothing changed and the problem disappeared.

    Had a power outage for 4 hours in the building.

    When the power was restored machine automatically restarted.

    So pulling plug on Z600, machine is not self-priming.

    Be able to fail the entire building: boots of router, monitor, Z600 and machines.

Maybe you are looking for