A background application alert

Hello

I have an application of Backgorund who request a number to a server, when the server returns the value '0' nothing happens and when he comes back ´1´ an alert appears (based on How_To_-_Alert_a_user_from_a_Background_application).

a few questions:

1. the application appear in the task switch, I think because of the UiAplication "extend", it is not no matter what screen or form to display, only the alert, when I chose my request on the switch it appears a white screen as expected. but is it possible that the application does not appear there?

2. it must be a simple. How can I add an action of noise or vibration to alert?

Thank you!

What you see (the very short sound, etc) makes sense.  The queueStatus() is not blocking.  So as soon as you have lined up this screen for display, the following code is executed and your code lights out.

I suspect that you have these choices

(1) to include a DialogClosedListener in your dialog and turn off your notifications in there

(2) start another Thread sleeping for any exercise you want and then turns off things

(3) scrap turn code in your main line, i.e. after the sleep (2000);

I'd probably do (1), but it's also probably the most work.

I also recommend that you change the priority of your screen from 1 to a larger number.  I had problems with priority notifications 1 layering system dialog boxes, which I don't think you want.  I tend to use 99, although I have no reason to do so.

Tags: BlackBerry Developers

Similar Questions

  • The background thread alert does not work

    Hello

    I have read the article http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/... and followed the instructions to display the background thread alert. However, the alert is not displayed and IU locks (freezes). Specifically, the event of click/touch does not work, but the background thread continues to run.

    Structure of my program. The main class (with the main function) extends UiApplication. I create in the function main instance of the class that extends the Application. This class starts backgorund wire. I am missing something or making the wrong way?

    Sorry I have expired, I was going to write a long response to this.

    But in short, remember that your automatic boot process and your user interface process, both through main with different parameters and are the BlackBerry is concerned, different applications.  So it may be an Application, the other can be a UiApplication, and both can enterTheDispatcher.

    No two instances of the same Application, they are two different Applications.  They can be of different instances of the same Application class, but it is a special case.  It depends on what you create in the main routine.

    You can play a merry dance with such things.  For example, having a UiApplication be started by the automatic boot process, and then the boot gui process can find it and just put in the foreground, rather than creating a new UiApplication.

    Generally however people create a request and a UiApplication.  The problem with the use of these different applications, is that things like static are not shared.  Therefore, use something like RuntimeStore to share data.  It is a pain and something that if I can avoid.

    It is perfectly possible to have a UiApplication, which starts when the device starts, runs Background Threads that are working in a network and is bought in the foreground by clicking on an icon.  Code is more complicated, but not much.  And you must have complicated the code when you run the network Threads background to deal with the unit off power and then power anyway.

    Hope that clarifies somethings.

  • Background task alert

    I am spawning my own threads to perform a task. I followed the thread in the task of inactivity at regular intervals, to see if the wires have been completed or not and get an update. Now my problem is,

    I would like to see Indesign leave until my task is completed. I prevent users to quit smoking by throwing a CAlert, that takes away control of my idle task.

    My question is, is there an alert of background (such as the reference in the programming guide) to page 127 so that I can keep my son of surveillance and close the dialog box once the process is complete?

    "

    Background threads cannot directly report to the user on the progress, success or errors. These are some

    presented in the background tasks Panel. In addition, an animation is displayed in the application bar when

    background tasks are underway and an background task alert may appear when a background task

    He must convey a message to the user.

    "

    Such background task is displayed when a user tries to leave indesign and itself is removed when the task is completed, as this. Is there such an API exposed to third-party developers?

    Define dialogue en and then passing ' dialogue IDialog * = dialogMgr-> CreateNewDialog (dialogSpec, IDialog::kModeless); "solved the issue.

  • How to call BlackBerryContactList.choose () of the background application

    I am facing a problem while call BlackBerryContactList.choose () to background application (process) nothing happens.

    Below is the code

    List of BlackBerryContactList = (BlackBerryContactList) PIM.getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_WRITE);
    Choose PIMItem = list.choose ();

    When you call a user interface application works well, but even does not work when the application background.

    Please help me...

    This dialog works separately from your Application.  It is not actually a part of your Application.  It is a Global screen.  It works very well.

    But to use the dialog to choose, I think you should return control in your application, and as you've found, I think that you need to bring your application to the foreground in order to ensure that he choose the dialog box is displayed.  This means that you have to run a UiApplication, not a request.

    To make sure that it can request not bought to the forefront accidentally, you can set acceptsForeground() to false.

    But when you want to use the Choose dialog box, you will need to have this method returns true and then put your Application in the foreground.  When you get the answer to choose, you can set it to false and again take your application in the background.

    I suggest while you develop it you just create a UiApplication standard and make it work like that.  Then try to simulate an application by adjusting the acceptsForeground() at the right times.

    Since your application will in fact be a UiApplication, I suggest you have a too associated screen.  A simple splash screen will do.

    I hope this helps.

    PS > there is a small chance that you can requestForeground on your Application when you call the method of choice and it appears.  Try it.  But I will not be surprised if it fails.

  • How to retrieve the touch of background application coordination.

    Hi guys,.

    Is it possible to recover some contact details by background application (Os 7.1)?

    Thank you

    Well, can mark you this as resolved then?  Instructions help link located at the top of the screen if you need.

  • Problem with background application.

    Hi all

    I develop background application, which always runs in the background. If the application then restart my app starts to reboot. But for some unknown reason, to leave you my request. But I am unable to know the reason why is output.

    Can someone help me please in this?

    -Shekhar.

    On the device, tap L G L G

    Or, you can download the appliance event log using javaloader.

  • KeyPress events for background application

    Hi all

    I need to develop the following features:

    When a certain key sequence is pressed [say #data #], an application must be called

    The background application can check for such a sequence and start the event.

    However, the question is, if an application can have access to key events when he is not on top of the stack in the user interface. In addition, such a feature may be possible when another application [say a native application such as Message or address book] is running.

    I personally don't think it is possible, however, if someone met an implementation of the similar device or method to achieve, then it would be really great.

    Thank you and best regards,

    Basilio J V Souza

    This is possible if the user interface for your application is in the foreground.  If this is the case, you can use this technique:

    Use a sequence of backdoor

    http://supportforums.BlackBerry.com/T5/Java-development/use-a-backdoor-sequence/Ta-p/445180

  • HomeScreen.updateIcon updates the bad background application

    I have an application with two entry points. A single point of entry runs as a background application to listen to calendar changes. When the Exchange Calendar I need to change my icon on the home screen to the GUI of my app app part. However, if I am in another application when the event occurs, the current application has its icon has changed.

    I know that there is another version of updateIcon() in 4.7, but how do I handle this in older versions of the operating system?

    Use a global event to send a message to your Application that the calendar has changed.  Your application can then some he wants, including the amendment of the application icon.

    What is - world events and global event listeners
    Article number: DB-00145
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is...

  • Need to know about the background application

    Test Simulator with JDE version 5.0. I work at the request of the alarm. So I created a background application, where I look in the database and perform the necessary task vibrant just the phone. I have another point with nongui param. Its works fine. Now the problem is, I set an alarm for once, now is the time and the alarm goes off and the user he repeated for 10 minutes, average while I just still run my application in the menu of the eclipse without closing the Simulator, I was expecting that the alarm that was repeated should get fired, but it won't. the problem always occurs when I run the application without closing the Simulator. So what can be the reason for this, and if I just closed Simulator and run it from the eclipse menu its new working fine means repeated when time comes it vibrates the Simulator can someone explain me what are the problem here.

    Do not disable not either sorry here...

    Your code looks fine.

    You can run this code too early.  You probably need to wait until the device is completely upward before you check this:

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

  • Background application of MysQL PHP

    Has anyone using PHP / MySQL / uninstall to develop a background application that is clocked at base?  Basically, I'm looking to trigger a procedure stored all "n" minutes.  Is it possible to write / configure an app for that?

    Hi Jim,.

    There is a little bit different cron to applications running on a windows platform.

    I couldn't tell you who is the best.

    ICron

    ZCron

    nCron

    etc.

    Google cron for windows.

  • How to show the background application

    Hello

    I want to follow an alert in my application when the application is in the background.

    I tried with this code: -.

    Alert: AlertDialog var = new AlertDialog();

    Alert.title = "alert";

    Alert.message = 'Notification '.

    alert.addButton ("Cancel");

    alert.addButton ("Show");

    alert.dialogSize = DialogSize.SIZE_SMALL;

    alert.addEventListener (Event.SELECT, alertButtonClicked);

    Alert.Show ();

    But it does not show the alert outside the application.

    But on further research on the web, I had found earlier than alert.show (IowWindow.getAirWindow .group ()); will allow the alert to be strictly within the application. Is this means that show() alert will generate alerts in the foreground, even when the application is in the background?

    Also, I want to put the application in the foreground when you press the button display. is it possible

    That is to say, the application state must be changed programmatically to 'normal '.

    Please help me

    Thanks in advance

    Vineeth K

    Looking for QNXSystemPowerMode to learn more about how to run your application even when it is in the background.

    Note, however, that if you do it wrong, you're going to drain the battery too fast and no one will want to use your application.  Do not set up just to sit in THROTTLED mode all the time if, for example, you want to just check a timer and do something later.  There are ways to use this very effective stuff, if you spend the time to learn.

    In addition, with regard to the "bring programmatically the app in the foreground", it is not possible unless you use a dialog box modal system (in other words, what you get with alert.show (()) just does it automatically.

    And it's probably a good thing... If I installed an app which itself has jumped to the forefront, becomes the active application, I would probably uninstall it immediately.  After all, how do you know that what the user is doing is not more important to him that no matter what your application wants to report?  It might be in the middle of a game, or give a presentation, or else where he does not want your application is throwing in the view.

    The same goes for using the 'modal system' form of the dialog as well.  I highly recommend that you not use it.  I believe that it is really only meant for critical problems of the system, such as the lack of flash memory or memory, and you will notice that it is not even use it to the situation of the latter.  (It might not for low flash either... I've never tried still get there.)

    If you want to attract the attention of the user, using a sound index (for now, the way that only acceptable, in my humble OPINION) or wait until the Notifications feature is documented and fully available for us.  That do the little "red flash" appears in the upper left corner and display a notification in the tray (top left corner) as well as how the PlayBook is currently app updates are available in the App World.

    If you insist on the use of the modal approach of the system, I would be very interested to learn what is the use case, as so far, I do not think that someone has described one that would generally be considered a valid use of this API, for most users.

    Finally, if you don't use a modal system, consider to give the user a way to disable it, as in your settings menu.

  • Correct procedure for a background application

    I'm just after some advice on the correct procedure for the handling of my application going on in the background.

    Basically I want the app to continue running if the user switches to another application, unless the user chooses the close menu item.

    So right now I'm handles the event close and him do ask the background so it stops at the close running event and my screen from the stack.

    public void close() {
        UiApplication.getUiApplication().requestBackground();
    }
    

    Now, this caused the menu item close not to work because she calls just this code as well.

    Am that I supposed to replace the narrow Menu with my own?

    Or I just hurt?

    I also want the app to close if the BB will restart or reboot.

    Chris

    What you have done is very good - I suggest that you also add an another menu item 'Stop the Application', which stops everything and makes a system.exit()

  • pushGlobalScreen of background application give runtime exception.

    Hi all

    I've implemented an application extending application. making background app.

    also, I updated the property system and auto-start module.

    Now, I want to display a message to the screen. to do this, I used following code...

    showMessage (final String mesg) {}

    Bitmap.getPredefinedBitmap (Bitmap.EXCLAMATION);
    UI UiEngine is Ui.getUiEngine ();.
    Screen = new (Dialog.D_OK, mesg dialog box,
    Dialog.OK, Bitmap.getPredefinedBitmap (Bitmap.EXCLAMATION),
    Manager.VERTICAL_SCROLL);
    ui.pushGlobalScreen (screen, 1, UiEngine.GLOBAL_MODAL);

    }

    If I put this code before appMain.enterEventDispatcher (); then it will run correctly and without error.

    When I call the showMessage method after appMain.enterEventDispatcher (); then it will give runtime error.

    My requirement is to read the udates server and then display the message. So I can't do it before appMain.enterEventDispatcher (); in the main method.

    I am getting following error

    java.lang.RuntimeException: pushGlobalScreen (modal) called by a thread of non-event

    How can I solve this error?

    Is there no work around to do the same thing...

    Waiting for response...

    Help, please

    Thank you

    Ashish...

    Replace this statement:

    ui.pushGlobalScreen (screen, 1, UiEngine.GLOBAL_MODAL);

    with this statement:

    Application.getApplication().invokeLater(
      new Runnable() {
        public void run() {
          ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_MODAL);
        }
      }
    );
    
  • Background applications

    Hey guys,.

    I want to do is have my (invisible) application startup when the BlackBerry device starts up and be able to push screens (bring up screens) whenever it takes.

    How can I achieve this? I've read that signing the app is required, but this should be no descendants.

    In this case, what happens when the user accesses the Applications and running my application from there when it is already running in the background?

    Much appreciated,

    Pav

    1. press on the screen, just stay in the background.

    2. you don't need, press icon will bring the app to the foreground with no work on your behalf.

    3. start automatic ownership of the project.

  • removal of Auditors in a background application running

    Hello

    I have a question: if I have an application that starts with the phone and runs in the background all the time, and in this application, I had some listeners, normal example: AbstractPhoneListener... I know that I must remove it when an application is closed. But what for running in the background app? I life average-applications, works all the time, and then the user reboots the device, application will be closed and started after the reboot. and then another AbstractPhoneListener will be added... This ofcourse situation doesn't happen... my problem and the question now is what to do with it? There is no way that I can recognize that just now, the user is going to restart the unit, so I'll remove the headphones and after the reboot, I'll add again. also there is no way I can check by program if the listener has been added and prevent then add it again...

    What can I do with it?

    Kind regards

    Hmm, it seems that the listener is deleted automatically to restarting the device...

Maybe you are looking for

  • iMac to run out of memory system [Etrecheck report]

    I have an iMac 2013 end (27-inch, 3.2 GHz i5) with 24 GB RAM installed running OS X El Capitan 10.11.5). Whenever Safari is open, it slows down gradually until I get a message "your system is out of memory the application" and several applications ha

  • How can I get Firefox to load the font "Symbol" and "Wingdings"?

    My 8.0.1 version doesn't have a 'symbol' or the fonts 'Wingdings' listed and when I visited my html document these characters end up using the Arial font. I have the documents with a lot of less-than-and-equal, more-than-and-equal and a crowd of othe

  • Satellite A200 - 23P - upgrading to Windows 7

    About 2 years ago, I bought laptop Toshiba Satellite A200 - 23P with Windows Vista perinstalled. Now I want to upgrade to Windows 7. I download Windows 7 Upgrade Advisor, he wrote that: 1) more info at TOSHIBA TOSHIBA has a Web site that might give y

  • Microsoft Narrator does not read what I want it.

    Original title: I have windows xp. Narrator doesn't read what I want it. Is there another type of Narrator that I can download for free?

  • Malwarebytes MS Security Center problem reports.

    After installing Windows Security Essentials (MSE), I ran Malwarebytes' Anti - Malware (MWB).  He reported this: Infected registry data items:HKEY_LOCAL_MACHINE Center\UpdatesDisableNotify (Disabled.SecurityCenter)-> Bad: (1) Good: (0) not-> no actio