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
Developer
Posts: 62
Registered: ‎07-14-2008
My Device: Not Specified
Accepted Solution

pushGlobalScreen restrictions?

[ Edited ]

Is it possible to get several global screens shown at the same time in the order they are pushed on the stack?

 

If I push a FullScreen from a background application using

 

 

synchronized (Application.getEventLock())
{
Ui.getUiEngine().pushGlobalScreen(paramGui, 10, UiApplication.GLOBAL_QUEUE);
}

 The screen is shown as expected, but if I push another global screen (which extends PopupScreen) from the the first one in the same way with priority 9 - it is shown, but the first one disappears showing the home screen in the background.

 

After closing the popup-screen, the first full-screen appears again.

 

JDE 4.2.1

Testing on 8100 4.5.0.37

Message Edited by Ivanov on 07-15-2008 09:42 AM
Retired
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: pushGlobalScreen restrictions?

Good question!

 

The only limit to global screens on the BlackBerry today is that only one global screen can be shown at one time.  Each global screen is placed in a queue based on the priority of the screen specified.  The screen with the higher priority will be shown to the user while the remaining global screens will be held off screen in the queue.  Once the highest priority screen is popped off, the screen with the next highest priority will be shown.  

 

Note that there are two screens which will always have higher priority than anything the third party application can set - the incoming phone dialog and the lock screen.

 

Finally, you should know that the call to push a global screen is NOT blocking.  As such, you need to add additional logic to your application (in comparison to modal dialogs within your own application) to handle this fact if you expect it to block waiting for the response.

Mike Kirkup
Director, Developer Relations
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: pushGlobalScreen restrictions?

"Finally, you should know that the call to push a global screen is NOT blocking. "

 

Unless you use:

UiApplication.GLOBAL_MODAL

 

 

Right ?



"Listen carefully, I shall say this only once"
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: pushGlobalScreen restrictions?

there is also the limit that Integer.MIN_VALUE may not used as a priority on real devices, it results in a security exception, only rim can use it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 304
Registered: ‎08-01-2008
My Device: Not Specified

Re: pushGlobalScreen restrictions?

The limit for priority is actually -1073741824 (0xC0000000) - the priority of lock screen. Your priority must be higher than this value.

 

So that means you cannot display anything above the lock screen Smiley Sad

 

Another screen that has the lower priority is alarm alert screen.

 

Mike, can't we have a application permission to allow this?

New Developer
Posts: 14
Registered: ‎11-02-2009
My Device: 9500 Storm

Re: pushGlobalScreen restrictions?

 


adwiv wrote:

Another screen that has the lower priority is alarm alert screen.

 

Mike, can't we have a application permission to allow this?


I'm still interested in the reponse to this question. Can someone respond to that ?

 

 

JoPs
Highlighted
Developer
Posts: 98
Registered: ‎01-06-2009
My Device: Pearl 8110

Re: pushGlobalScreen restrictions?

Include SHOW_LOWER_PRIORITY as in:

                    pushGlobalScreen(testScreen,
                            <your priority #>, GLOBAL_MODAL
                                    | GLOBAL_SHOW_LOWER);