When an application is in the background, it can do something? :

When an application is in the background, he can listen to specific events (i.e. backlightStateChange), but is there a way so that it can proceed with treatment of low priority, or something of the poll?

For example, if I want to make an app that keeps the backlight on, I can't use backlightStateChange in SystemListener, because it is only triggered after the backlight is turned off - that is to say after this gradual long melted in a recent operating system.  If I wanted to keep on, either, I have to keep the call Backlight.enable (true) - I couldn't not do when the application is in the background - or else I have to predict when it will stop and schedule a timer or invokeLater for just before the time-out period and reset the timer of the backlight.

What I found is that when an application is in the background, its clocks are frozen - it cannot enforce a TimerTask or a passable invokeLater, at least that's how it seems from what I have to try.  I could do a scheduleApplication, but that only has calendar wave (resolution of 1 minute more or less), so it wouldn't be useful to have an app question something in the system, every 10 seconds or that does not have a specific listener, i.e. in the example of lighting is no listener for an imminent expiration time, that actually happened.

The BlackBerry is supposed to be multi-tasking, so how to I can not get an application to run at all in the background?  No possible demon?  What did I miss?

Thank you

Hello

I did some experiments with background applications in the emulator. My findings are different from yours.  I'm including them below:

1. when an application moves in the background, he is able to do the following:

-Schedule timer jobs that do not access the user interface.

-o file

-perform any related processing no UI, including any floating point calculations.

I have no t try invokeLater Runnable. But I think I know it shouldn't work since

the object to be executed in case of thread, this method calls annexes.  When an application is in the background, it doesn't have access to the user interface. Thus, invokeLater.Runnable is a no-op for her.

-MO.

Tags: BlackBerry Developers

Similar Questions

  • 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().

  • drawing on the screen when the application is in the background

    Hello

    is it possible that I can draw a small circle on the screen? but this circle can be visible on the screen, suggest a circle on the screen, I started my candidacy and I press the key 'End' that makes my request in the background can now circle can be viewed on the home screen and all the other screen where I want to sail?

    is it possible? If so how?

    As far as I KNOW, it is not possible to trace a circle on the home screen and all the other screen which you access while the application is in the background.

    Concerning

    Bika

  • I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do?

    Hello. I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do? TQ

    Hello. I disconnected from the home group, but when I try to join the homegroup I can't because I put a password and I forgot the password. What should I do? TQ

    Where can I find my homegroup password?

  • is it possible to hide the system dialog box when app is happening in the background

    Hello

    I want to hide the system dialog box when our application is underway in the background...

    any suggestion would be appreciated

    Thank you

    Ankur

    Use onThumnailed()

    and this, write the code to hide the system dialog box.

    go through this link too:

    https://developer.BlackBerry.com/Cascades/reference/bb__application.html#function-thumbnail

  • When I try to put the background that is not color. only, I get a black screen.

    everything about the definition of the background. accept all I get is a black screen.

    Hi Troy,

    MSE affect the definition of the background or order so you can exclude as the cause.

    When did start?  If the latter, try a system restore to before it started to see if that helps. If you use Windows 7, seehttp://www.sevenforums.com/tutorials/700-system-restore.html. If you are using Vista, seehttp://www.howtogeek.com/howto/windows-vista/using-windows-vista-system-restore/. If you are using XP, seehttp://support.microsoft.com/kb/306084. Sometimes this simple process made the rounds and sometimes that doesn't help - but it is easy and worth if she has recently begun.

    If this does not work, try to update the driver, firmware, or software for your video card and monitor by checking with the manufacturer of the computer to get the latest for your specific computer model and (your preference based on the serial number), as well as your version of Windows.  Be updated via Device Manager, save the changes, reboot and see if that helps.

    If this does not work, go to control panel / customization and a more basic theme or background plus standard (and other similar adjustments) try to see if you can find one that works (or partially to work).  Then you will know that the question is somewhere in this configuration and it can take time to find something suitable for you.

    I hope this helps.

    Good luck!

    Kosh

  • How should I detect the application runs in the background?

    Hello friends,

    I use 2 statement to run the application in forground and background.

    UiApplication.getUiApplication () .requestBackground ();
    UiApplication.getUiApplication () .requestForeground ();

    I need to check my application is running in the background or forground? someone help me how should I detect that my application in what state?

    {if (condition)}

    System.out.prinltn ("application run in Background");

    }

    Else if (condition111) {}

    System.out.prinltn ("application in the foreground");

    }

    What is this condition? and condition111? Please help me with this...

    Thank you and best regards,

    Ajay Patil.

    Hello

    With the help of UiApplication.getUiApplication () .isForeground (); You should be able to determine if the application is in the foreground. Hope that helps.

  • BlackBerry Smartphone Applications running in the background?

    Y at - it somewhere that I can see what applications are running on my "BOLD", and if I can close applications from one place?

    For example, I have often several open applications and press the end button or the back button without actually leaving the app.  Hours later my phone is running slowly and I forgot what apps I may have open and run in the background.

    Is it possible to see which applications are underway with/without entering each of them individually?

    Thank you!!!

    Alex

    On your home screen and more any screen, you can press Menu > Swirch Applications to display those running in the background. Close the is not necessary.

    Always running in the background will be your Homescreen, BBMessenger, Messenges, phone and browser, and maybe other third-party applications that need to run in the background in order to exploit (BBAlerts is a good example).

    Make sure that the browser is not open to an active Web page.

  • How to stop Windows 8 applications running in the background

    Hello world

    I use windows 8 in my pc, it works fine for me, but now I'm frustrated with their apps running in the background. I'm not a regular user of windows 8, so I can not able to solve this problem. Please suggest me easiest to solve... Thank you

    Windows 8 modern apps can't run in the background.  If you minimize a program and then open task (Ctrl + Shift + Esc) Manager, you'll see that applications use not your processor (applications stop working).

    You can also make it easier to see by checking the details view:

  • I deleted the icon of calendar by mistake and I don't know how to save her. The application works in the background, but I have no icon on the screen.

    I have a revolution with Firefox OS version GeeksPhone: 1.3.0.0 - prerelease. The default calendar app, I searched on the market, but I have not found it.
    I slipped between screens, but there is no calendar icon. It seems if I search "Calendar" in the section "research" of the first screen but I can't go out of the section "research".

    Thank you

    Hi Flops,

    You should not be able to remove an application from system like the calendar in the same way that users can remove applications downloaded on the market.

    After reviewing the information you provided, we believe that the best way to solve this problem would be to reset your device.

    Warning: Resetting your phone will remove all data stored on the device, including applications, data from the calendar, e-mail accounts and settings.

    To reset the device, follow these instructions:

    1. Open the

      Application settings .

    2. Press the button of device information .
    3. Press the button more information .
    4. Press the button reset the phone .
    5. Press OK to reset your device.

    You can also contact support directly Geeksphone channels so that they can consider whether there is a device-specific problem with their phones of revolution.

    We hope that this problem fixed the problem you had. Please report to us if this helped!

    -Ralph

  • half of my use of the iPhone battery 6 is a music in the background, how can I turn it off?

    How to turn off the background music which uses half my battery usage?

    Go to settings > music > disable Mobile Data use

    Then settings > general > background App update > turn off

  • I reinstalled LR 6 (not cc) after doing a reinstall of Windows 10.  I can ' get the installation program.  It says that the download was OK, but when I try to open the program, I can't past the 'software license agreement '.  He comes back just to the top

    After installing the two LR6 (not cc) and 13 items after a clean install of Windows 10, they seemed to work properly.  Then the next day when I tried to open, I had a screen telling me to uninstall it and reinstall both., I did.  Now when I try to open a program, I get the 'software license agreement' and when I click on "accept", it comes up again.  In other words, I can't open a program.   I did uninstall and reinstall several times with the two LR6 and Photoshop elements 13 and the result is the same.  (can not cross the screen of the 'contract').

    Check it out software license agreement reappears after clicking on accept

    Hope this will help you.

    Kind regards

    Hervé Khare

  • All of a sudden on Windows Live Messenger, when I send that winked the background is black, how this return to normal? I use XP.

    When I send a wink while I am on Windows Live Messenger, the cat rather than show him the nod, it shows in a separate box that has a black back ground, how can I get that back to normal? I use XP and the latest Windows Live Messenger for XP. I'd appreciate any help, thanks.

    As for l\ive of Windows Messenger, it is for the Court to Windows Live Solution Center. Please repost here.

    Here is the link to the Forum Messenger - Messenger son section:

    http://windowslivehelp.com/forums.aspx?ProductID=2

  • How to close an Application running in the background of a screen called since UiApplication?

    • Windows 7 Enterprise 64-bit (6.1, Build 7600)
    • Java: Java (TM) SE Runtime Environment (build 1.6.0_22 - b04)
    • Eclipse version identifier: 20090619-0625
    • BlackBerry Eclipse plug-in: 1.1.2.201004161203 - 16
    • The Java compiler level: 1.3
    • BlackBerry OS: Targeting devices running OS 5
    • Simulators: JDE packed 9700, 9630, 9550, 8900, 8520 5.0

    implement http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/system/GlobalEventListener.htm... in your Application, the System.exit call.

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/rim/device/API/system/ApplicationManager.html... to validate a global event.

  • Download applications database to the pc so can hotsync to m500

    try to get a database application to download to my pc. you want to be able to type in put on pc (windows 7 ultimate). to use a soft to catalog my al. library downloaded Ai book Tracker; Backpack books; Journal of books and Tomevault. They show in my file load down, but I can't open it on my computer to use the typewriter. A bit of a novice at this.

    I'm not familiar with any of these applications.  However, to do what you describe (enter and edit data on your handheld or on your desktop) requires an application that has both a pocket computer and a desktop application companion that communicate with each other.

    Consider the products of SplashData SplashShopper.  Yes, the name says "shopper", but it of a great list Organizer and comes with a desktop application.

Maybe you are looking for

  • How to make itunes on an Android 5.1.1

    How to make itunes on my android5.1.1

  • Coverage Checker

    New technology for a company and I have 147 laptops to find the warranty information.  Check coverage tool is only letting me do 5 or 6, and then he kick me for an hour.  Any way easier to get checked for product warranty?

  • node formula bracket problems

    Hi you all,. I'm squinting, trying to figure out what the problem with the equation that I try to use a formula node. I have attached the two VI ( LabVIEW 2009version) and the msg of error unfortunately, there are a couple more of these, but maybe if

  • Cannot view attachments of a message when trying to send

    Recently, the attachments do not load once try to convey a message to an e-mail address... It shows that attachments in total size, IE (4.1 MB of 25.0 MB) but not the file attached. Taking into account that I can visualize correctly and also the down

  • Adapter does not work as expected

    Original title: weird problem with my adapter? Helloso I found relatively similar problems but tried all solutions and the problem is the same so my network is on any package in or out?no details about my connection what so ever can as you seeand I h