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: 384
Registered: ‎08-12-2008
My Device: 8700

how to dismiss a globe pop up dialog within backbround thread?

Hi All,

 

I think I should to elaborate my issue right now,

 

I have more than one module to run to monitor some event,

 

if there is something coming, one background thread will pop up a dialog(name NORMAL dialog) to notify user.

case 1: user does not do anyaction on this dialog and then another more important event happen,

 

it will dismiss the NORMAL dialog and pop up the more important dialog.

 

my issue is :

 

pop-up a dialog works fine within BK ground thread via UiApplication.getApplication.invokeLater(new Runnable()({

........

}

 

when I dismiss the global dialog by using the following function:

        try{
            if(screen.isDisplayed()){
                synchronized (screen.getApplication().getAppEventLock()){
                    UiEngine ui = screen.getUiEngine();
                    /* VERSION_DEPENDED: 4.2 4.3 4.5 4.6 4.7 5.0 6.0 */
                    ui.popScreen(screen);
                    /* */
                    /* VERSION_DEPENDED: 4.0 4.1 * / 
                    ui.dismissStatus(screen);
                    /* */
                    ui.relayout();
                }
            }
        }catch(Throwable t){
            t.printStackTrace();
        }
        pushNext();

 

 

it works for OS below 6.0.0 except new OS 7.0.0,

 

Is there anything changed on pop up mechnism within latest OS7.0.0?

 

Thanks

 

 

 

 

 

 

 

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: how to dismiss a globe pop up dialog within backbround thread?

Can you elaborate on what is not working?  Is an error or exception thrown?  If so what is it and what are its .toString details?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Re: how to dismiss a globe pop up dialog within backbround thread?

Hi Mark,

 

I have reported to issue tracker  with my smaple application,

 

and I should update it there, it happened only on torch 9980 device, while not happen on Bold 9900(?) device.

 

Both are 7.0.0 device.

 

BTW, Bold device sometime will popup dialog say memory leak...i will right a sample to reproduce it.

 

 

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: how to dismiss a globe pop up dialog within backbround thread?

Thanks!  Can you provide a link to your issue in Issue Tracker?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker