Strange issue with globalscreen
I have devloped a blackberry app which pops up a global popupscreen when a text message comes in. I had this app working fine on torch and am now testing it on my storm 2. It is being built with 4.7 jde.
The problem is that when i receive a tex开发者_Go百科t message I am getting inconsistent results with 2 different devices/os, on the torch the app displays a popupscreen and closes on escape key with no problem.
However, on the storm 2(os 5.0) the whole phone freezes and requires a restart. I suspect that the screen is kind of being pushed onto the stack as it has a ticker in it and when i restart the phone i can see the log.info() notes in the log from the ticker run method from before restart.
I cannot see any screen on the stack when the device locks and no key presses are responded to (on torch pressing back closes my popup as desired).
I am pushing the screen as advised on various rim pages.
synchronized (Application.getEventLock())
{
Ui.getUiEngine().pushGlobalScreen(pop, 1, UiApplication.GLOBAL_QUEUE);
}
Some notes about my app - the app is a system auto start module and overrides acceptsForeground so it is never shown in the application switcher. It extends Application.
Any advice is welcome as this has me stumped.
Regards
I am wondering about the method you are using to push... Since you obviously want to interact with the user, you might be better served subclassing UiApplication, entering it's own event dispatching queue after instantiation, then utilize it's process to launch your popup via invokeLater()
I only say this because I use this method for background push listening apps on a regular basis.
It seems that you may enter into some issues with other applications which may not be as friendly or polite as your own if you rely on capturing the generic Event Lock.
Hope that's at least helpful.
精彩评论