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: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Kill/Close all active screens

Hi, is there a method for me to close all screens pushed within my app without closing each individual ones?

----------------------------------------------------------
Twitter: @gyubok
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Kill/Close all active screens

No.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Highlighted
Developer
Posts: 209
Registered: ‎04-30-2011
My Device: BlackBerry Z10
My Carrier: Airtel

Re: Kill/Close all active screens

Hi 

 

Try this...

 

   public static void popAllScreens()
        {
                int screenCount = UiApplication.getUiApplication().getScreenCount();//Gives how many screens are active state in background;
                for (int i = 0; i < screenCount; i++) 
                {
                        Screen screen = UiApplication.getUiApplication().getActiveScreen();
                        UiApplication.getUiApplication().popScreen(screen);
                }
        }

 

Thanks'

Pawan