Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Super Contributor
pg1181
Posts: 398
Registered: ‎01-12-2011
My Device: Q10

Handling BIS Push not always working

What's the method that fires when I receive a push?? Is it Process?? I used the following code:

 

synchronized (GoodToGo1.getEventLock()) {
   Globals.theApp.invokeLater(new Runnable() {
   public void run() {
    Globals.theApp.pushScreen(new Dialog(Dialog.D_OK, "Push Received!!!", Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Dialog.HORIZONTAL_SCROLL));
    Globals.theApp.requestForeground();
   }
   });
   }

 

In the Process method and it successfully makes a Dialog pop up when I receive a push. But if I exit the application and launch it again this stops working. Where would I handle a push when the application is no longer running?? And why is this only working for the first session?

Please use plain text.