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.

Tags: BlackBerry Developers

Similar Questions

  • How to show the IOM application instance account password in the user interface

    Hello

    I would like to see IOM application instance account password.

    In OPAM, there is a "show password" button.

    Is it possible to do the same thing in IOM? If so, how?

    TIA

    Leo

    Customized using managed beans sound possible, you can try something similar to the example below:

    IOM Managed Bean example: password reset custom

    http://oraclestack.blogspot.in/2014/12/OIM-managed-bean-example-custom.html

    Or if its requirement quite normal for all users, it must be visible, then you can create a new field in your form to process and fill in the application form as pop prerequisite. But this is not recommended.

    ~ J

  • How to show the multiple declaration for an application

    How to show the multiple declaration for an application

    Thanks for your suggestions...

    Looking at the javadocs you can only save an indicator by application. You will need to do three separate applications and package them as an If you want three different indicators to be visible at a time. Or change the flag that (or which group) of the indicators you want to display.

  • How to set the background image on my request.

    Hi all

    I use jdev 11.1.2.4.0 version

    use case: I create mobile applications and using the skin by default 'mobileFusionFx '.

    so when I run application there show black screen as a background image on my application

    My question is how to change the background image.

    Thank you

    Manish

    Resources of the Application open-> descriptors-> ADF META - INF-> adfmf-config. XML

    Check the family skin it and use in the skin of skin-addition id attribute.

    With this way automatically all your pages will use the same background image.

    In addition, background - image: url("images/back.png");    ---> It denotes that this images folder is inside the css file. If the pictures folder is a brother to css file, use

    background-image: url("..) (' / images/back.png ');

  • How to change the background color of selection of the selected item in the drop-down box of choice?

    How to change the background color of selection of the selected item in the drop-down box of choice?

    By default, the selection background color like 'blue', but if I want it to be "yellow" for example, how should I do?

    Thank you

    The id is applied by (I think) the skin of the ChoiceBox class. You don't need to define.

    You must apply the css in an external style sheet. You can apply the external style sheet to any parent of the box of your choice, or on-site (the most usual way to do it).

    Example:

    import java.util.ArrayList;
    import java.util.List;
    
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class ChoiceBoxTest extends Application {
    
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("Example 2");
    
        final ChoiceBox choiceBox = new ChoiceBox<>();
    
        List tempResult = new ArrayList();
        for (int i = 0; i < 10; i++) {
          tempResult.add("Item " + i);
        }
        choiceBox.getItems().setAll(tempResult);
    
        VBox root = new VBox();
        root.getChildren().add(choiceBox);
        final Scene scene = new Scene(root, 300, 250);
        scene.getStylesheets().add("choiceBox.css");
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    
    }
    

    choiceBox.css:

    @CHARSET "UTF-8";
    #choice-box-menu-item:focused  {
     -fx-background-color: yellow ;
    }
    #choice-box-menu-item .label {
     -fx-text-fill: black ;
    }
    

    Post edited by: James_D

  • How to create the flex application progress bar?

    Hi guys

    I'm doing a progress bar to show the my application status of loading. I googled a lot, but it shows how to use the progress bar for the elements (ex: images, datagrid). I need to know the configuration of progress for the whole of the application bar. I'm sorry if this is a noob question. My brain does not work now. Thanks for any help.

    You can see this link which gave the complete code to do...

    http://blog.preinvent.com/node/6

    If this post answers your question or assistance, please mark it as such.

  • How to change the background of the playlist window colors in iTunes

    The background color of my playlist 'window' in iTunes is black, which is difficult to read.  How to change the background of all the playlists to a light color.

    All the indications are that the selected background colors are random and cannot be changed. If someone knows a way to change them please let us know.

  • How to show the photo album in Apple Tv screensaver.

    How to show the photo album in Apple Tv screensaver. ?

    You can use your photo stream or albums shared for the screen saver, the iCloud photo library can be viewed only manually.

  • How to disable the background update in the window 10?

    Anyone know how to disable the background update or surveillance? I already turn off the window updated administrative tools and all I know which include antivirus. However, my internet speed always very slow.

    My internet package comes with a slow speed and I couldn't go in the Web page when it has updated or programs using my internet connection in the background. Can I only surf the internet when there is no update in behind.

    I would be grateful if anyone of you could let me know how to solve this problem. Thank you

    Coolcola, welcome to the forum.

    Here's a guide that should help you solve your problem.

    Please click on the button + Thumbs up if I helped you and click on accept as Solution If your problem is resolved.

  • How to access the health application on an iPhone 4 running iOS 9.2 s?

    How to access the health application on an iPhone 4 running iOS 9.2 s?

    The icon is missing?

  • How to change the background color of string programmatically?

    How to change the background color of string programmatically?

    Are you talking about string indicator and control chain? If so, right-click on a control/indicator of string and select Create-> property Node-> text-> text-> BG Color colors. Change to write and a number of the color you want to use phone.

  • How to show the ink levels on the computer for Officejet 6600

    How to show the ink levels on the computer for Officejet 6600

    What is the full product name or product number?

    is your printer?

    This is the Manual of your printer the following image was derived.

    You can use the printer's built-in web server to get the status of the printer information from a browser.

  • How to reduce the background screen photo to fit screen?

    My computer has recently been worked on by a repairman. Now, when I select a photo for the background image, the image is much larger than the screen. Also the photos in the photo library are larger that they use to appear in front of the computer has been repaired. How can I fix? Thank you

    Dave

    My computer has recently been worked on by a repairman. Now, when I select a photo for the background image, the image is much larger than the screen. Also the photos in the photo library are larger that they use to appear in front of the computer has been repaired. How can I fix? Thank you

    Dave

    RE: How to make the background image to fit on the screen

    Right-click on an open office space > Persona; IZE > at the bottom, click on wallpaper > down under the position of the image, click on the pointer, and then select FILL > click on save changes when finished.

    PS, You could choose FIT instead of FILLING. Try both ways and see what is best for you.

  • How to set the background Transparent

    Hi all

    I'm very new to blackberry development, can someone tell me how to set the background transparent.

    Thank you

    Kishore P.

    Use this code:
    VFM VerticalFieldManager = new VerticalFieldManager () {}
    //...
    }
    vfm.setBackground (BackgroundFactory.createSolidTransparentBackground (Color.COLOR_YOU_LIKE, 0));

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

Maybe you are looking for