If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Regular Contributor
jssantosh84
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)

Please use plain text.
Developer
dnepr
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.

Please use plain text.
Developer
Hithredin
Posts: 401
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)
   UiApplication.getUiApplication().popScreen(this);
}

 

 

Please use plain text.
Developer
BB-Dude
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.popScreen(app.getActiveScreen());
}
app.push(Your Login Screen);

 

 

Please use plain text.