background page will stop automatically when the application is open.

I have a Blackberry application that have a background process, and it works very well when you install an application, but when you later open this app and then close, its background process stops. I think I'm just missing something small, or something wrong. My current thoughts, but I do not find anything related information so far: * to do something in index.html (resumeBackground?)

Hello joygupta,

If you want that your application is still running on the background, you must manage how your application exits through the blackberry.app.event.onExit by asking your app to go inside instead of shut down.

Here's a little code to do this:

blackberry.app.event.onExit(onExitCallback);

function onExitCallback() {
  blackberry.app.requestBackground();
}

This would cause your application to run in the background when the user "comes out" of your application and then reminds the blackberry.app.requestForeground event () once you click on the new icon.

I hope this helps.

Tags: BlackBerry Developers

Similar Questions

  • Yoga 2 pro 13'3 andro tab stops automatically when the screen is off & dosnt start evn battery is30 - 80%

    Hello

    I am facing this problem with Yoga 2 pro 13'3 pellets. It stops automatically when the screen is off and dosnt start until it is connected to the charger and press the same power button 30 to 80% battery. I don't know what it is. This happens every time

    No help for it?


  • If I can put a music file in which will start playing when the mail is opened

    I want to put a music file in the body of the email which will start playing when the emaii is opened please let me
    whether it is possible in Thunderbird mail
    Thank you

    See this: http://forums.mozillazine.org/viewtopic.php?f=39 & t = 79970 & start = 0

    I must say that I am not convinced that by using the specified HTML it could succeed to set the file musical itself. He would probably play if the sender displayed to himself and he opened on his own computer, because the file is local (always assuming that its authorized e-mail client reading.)

    Note that Thunderbird will not particularly play music embedded in messages, so if someone you send to use Thunderbird, they don't hear it.

    It is one of the reasons why I use Thunderbird. Besides having always cut sound. It can be very annoying having noise suddenly pop out of your computer in the workplace.

  • Skype rings only when the application is open

    I have a Skype number for my phone a few days ago and I just noticed a problem. When people try to call me using my Skype number, it sounds only when the application is open and the phone is unlocked. However, people can still call me normally on my Skype ID, it is locked or not currently open to the app. It's a rule I missed when having a Skype number?

    I reset my phone to factory settings and it works now.

  • Skype number rings only when the application is open

    I have a Skype number for my phone a few days ago and I just noticed a problem. When people try to call me using my Skype number, it sounds only when the application is open and the phone is unlocked. However, people can still call me normally on my Skype ID, it is locked or not currently open to the app. It's a rule I missed when with a Skype number?

    (Previously posted this in the Android subforum)

    I reset my phone to factory settings and it works now.

  • Servers HP stops automatically when the is not necessary.

    At the VMworld this year, I've heard servers HP stops automatically when they are not used or is not necessary and may have them start backup when they are needed.

    I know that this question is vague, but how will you implement this solution? I know you must have built-in bit, but that's all.

    The feature you refer to is Distributed Power Management (DPM) see page 60 in this guide - http://www.vmware.com/pdf/vsphere4/r40/vsp_40_resource_mgmt.pdf.  DPM requires Enterprise or Enterprise Plus authorization.

    Dave

    VMware communities user moderator

    New book in town - Start Guide quick vSphere -http://www.yellow-bricks.com/2009/08/12/new-book-in-town-vsphere-quick-start-guide/.

    You have a system or a PCI with VMDirectPath?  Submit your specifications to the unofficial VMDirectPath HCL - http://www.vm-help.com/forum/viewforum.php?f=21.

  • Prevent the PlayBook goes into mode standby when the application is open

    What is the code needed to prevent the PlayBook mode 'sleep' when the application is active?

    Maybe this can help: https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Tablet/sleep

  • 20.0.1: file == > new window & private in new window only will not open then Firefox will not stop running when the application is closed

    Although nothing seems to happen when clicking new window or new private window, there seems to be some process started because when I try to close Firefox and reopen it, I get an error message saying that Firefox is already running. My only option then is to stop the process through the Task Manager. I tried (many times) to uninstall and reinstall.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode safe or make changes.

    Create a new profile as a test to see if your profile is the source of the problems.

    See "create a profile":

    If the new profile works then you can transfer files from a profile in the new profile, but make sure not to copy corrupted files.

  • When the application is removed

    Hello

    How will I know when the application is removed

    make a wish of application registry in are on start .i want to cancel the phone from the server on the uninstall.

    In addition to a second request for guard dog, the only approach I am aware to do this was the CodeModuleListener added in OS 5.0.  Take a look at this and search the forum for other users who have tried it.  I'm not sure it works as well as we would like.

  • Delete PersistentObject of the store when the application is uninstalled

    Hello

    I expect that on request, uninstall the PersistentObjects used by the application would be removed, but this does not happen.

    How can I achieve it

    Thanks yo

    If you create a custom class that is persistable your persistent data will be deleted when the application is uninstalled.  If you use a class set of BlackBerry APIs, such as String and store in the persistent store, it is not deleted when the application is uninstalled.  This is explained here:

    Manage the data recorded during the withdrawal of an application

    http://supportforums.BlackBerry.com/T5/testing-and-deployment/handle-stored-data-when-removing-an-AP...

  • Audio stops when the application is blurred

    Hello
    I've recently upgraded to a 64 bit win 8 PC for my home studio.  In workflow, I often play audio through FL Studio 11 when recording the voice or guitar in a separate wave editing program.  Because the Win 8 install, Audio will stop completely when I switch the focus of the application of the software of monitoring/recording so lose my "metronome."  The same software does not behave like that on the 64-bit Win xp computer.  Is there a setting to disable this behavior somewhere? I ' ts, causing serious problems in my workflow.

    Please notify.

    Thank you for your time!

    I don't pretend to even came close to understanding your program, so you must forgive my lame efforts to help you.

    What this means, if anything?

    "The ticked off Auto button close device if you want that other applications to be able to use the sound card if FL Studio loses focus (e.g. reduced). If you do not check this box FL Studio will continue to use the sound card even if it does not have the focus. Other applications cannot use the sound card in this case, which can be annoying. »

    FL Studio Tutorial - How to record an external audio source in FL Studio
    http://forbidden-fruity.blogspot.com.au/2009/09/how-to-record-external-audio-sources-in.html

  • How do 'Enum Control' disabled during the execution of an executable application and make activated when the application is stopped/abandoned?

    Hello

    I use a "Enum control" on the façade of an executable application built with application builder for LabVIEW 2013 full professional development system. I want Enum control remains activated prior to execution of this request so that I can choose any value from the list of available numeric values, but when I run this application; Enum control should become disabled so that the user can not select another value in the list of data during application execution values so that the default setting remains unchanged during the execution of this application. Enum control must also be activated when the application is stopped/abandoned so that the user can select any value.

    Could someone pls suggest a solution to this problem?  If I select the active state' to 'Disabled' in appearance tab then all listed values becomes disabled.

    Concerning

    Jamal

    I suggest to use the node property of persons with reduced mobility.  You can then disable the enum at the beginning of the program and then activate it in the judgment.

  • (Redirected) Dell audio drivers will not load when the system is turned on for the first time after his stop.

    Dell audio drivers will not load when the system is turned on for the first time after adoption of Windows 10. I have to reboot every time. So what I'm doing puts the system into sleep. in this way, I don't need to stop and restart the system. It is Dell Inspiron N5559. Audio drivers are installed and up-to-date. Equipment works correctly.

    Hi akilesh.sharma18,

    Please repost this in the Audio forum from the laptop to help.

    http://en.community.Dell.com/support-forums/laptop/f/3517

  • Global dialogue - show when the application is in the background

    I have a function that opens a dialog for the user and the user must choose one of two options. The thing is, this function can be called when the user press a certain button, or when the application is in the background. So, to do this, I use the following code:

    synchronized(Application.getEventLock()){
                final Dialog d = new Dialog(Dialog.D_YES_NO, msg,
                        Dialog.NO, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
                // So I would identify it as a Dialog
                if ( Application.isEventDispatchThread() ) {
                    // We have the Event Thread, can just show the Dialog
                    UiApplication.getUiApplication().pushModalScreen(d);
                } else {
                    // running in background
                    UiApplication.getUiApplication().invokeAndWait(new Runnable() {
                    public void run() {
                        NotificationsManager.triggerImmediateEvent(ID, 0, null, null);
                        UiApplication.getUiApplication().pushGlobalScreen(d, 1, UiEngine.GLOBAL_MODAL);
                        NotificationsManager.cancelImmediateEvent(ID, 0, null, null);
                        }
                    });
                }
                return ( d.getSelectedValue() == Dialog.YES );
            }
    

    It works very well when the user presses the button that calls this function. However, when the function is called when the application is in the background, nothing happens.

    If you tap on the icon of the app again, it doensn can't have launched, the debugger says the application application forground and if he says so it is already running and doesn't anything. If the application crashes and you can't access.

    How can I solve this problem and make the pop up dialog box to the user evern if the application is not to the point?

    Thank you for your time.

    I had problems with invokeAndWait() gel all that precedes. Unless you really need, I would use invokeLater().

  • Local HTML storage when the application is closed

    Hello

    I would like to know if the local storage of a html page included in an application will be saved only when the application is closed, or the machine to stop.

    Yet, I use Adobe Viewer v30 for the test on an iPad and local storage is lost when I left Adobe's Viewer.

    Thank you very much.

    Yes, he does. Using localStorage.getItem () and localStorage.setItem (), Yes? We used recently for a game of treasure hunt in our publication to record what elements have been found in different articles of the folio. He worked in the LCA for us on the iPad, but also our custom application.

Maybe you are looking for