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

Regular Contributor
Posts: 94
Registered: ‎05-29-2010
My Device: 9000 bold
My Carrier: asfas
Accepted Solution

remove the screens from the stack

I am developing a secured application. So if the screens are stored on the stack, Then after logout or session expiry, if the user presses the back(escape) button then the user can view the other screens as the screens are popped out one by one.

Is there any way that when the user logs out or the session is expired all the screens are popped out(or destroyed)

Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: remove the screens from the stack

Cycle through all the active screens and pop them one by one.

Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: remove the screens from the stack

You may also try something like that to add on your View class:



public boolean onExposed() {
   if(secured && notlogged)



Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: remove the screens from the stack


UiApplication app = UiApplication.getUiApplication();
while(app.getScreenCount() > 0) {
app.push(Your Login Screen);