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

Posts: 105
Registered: ‎05-22-2008
My Device: Not Specified

ApplicationPermission screen causes 9800 to freeze

I am using on a Torch 9800.


I have an existing app that runs fine on 4.2.1 / 4.3 / 4.5 / 4.6 / 4.7 and 5.0


The app uses ApplicationPermission class to popup a list of required permission, if the

app detects that they are not present on startup.


For the torch 9800, the App is compiled on 4.6


Now, when the app starts, the system displays the permissions screen, but the app hangs.


Anyone else come across this ?

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

Re: ApplicationPermission screen causes 9800 to freeze

Permission screen works fine on 6.0.


What do you mean by "freeze"?   Have you profiled/debugged your code? 

Posts: 105
Registered: ‎05-22-2008
My Device: Not Specified

Re: ApplicationPermission screen causes 9800 to freeze

The application freezes.. hangs.. (The device itself is ok)

Not much info in the Alt LGLG logs,


I have done a lot of testing / profiling in the past and the application does work on

various models.


The difference is that I have NOT compiled this on JDE 6.x, but am using a JDE 4.6 cod on

the 9800.


My code checks to see if Permissions are available, and if not, adds them to a list, and

then uses invokePermissionRequest.


HOWEVER, it does so within an invokeAndWait on the main UI thread.


   This COULD be the problem, however, it works fine on older models.


   In fact I have changed this code so many times, to get it to behave properly, and I thought

that calling the invokePermisionRequest from the main UI thred in this fashion was the

correct way forward.


Code is as below.



          permissions is set to the list of required perm.

          theApp points to the instace of UiApp.


          Because I am using an anonymous class, I assign the vars to final vars.



           if(needsPerms) {
                final ApplicationPermissions permissionsFinal = permissions;
                final UiApp theAppFinal = theApp;


                try {
                     theApp.invokeAndWait(new Runnable() {
                         public void run() {

                            try {
                            RuntimeStore appReg = RuntimeStore.getRuntimeStore();
                            UiApp myApp = (xxxv.yyy.bb.UiApp)appReg.waitFor(UiApp.ID);

                            myApp.permsSet = "true";

                            } catch(Exception e) {
                } catch(Exception e) {





Comments ?





Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: ApplicationPermission screen causes 9800 to freeze

i call it in the application constructor, works properly.

first line of the constructor:


if (!checkPermissions()) {



feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 105
Registered: ‎05-22-2008
My Device: Not Specified

Re: ApplicationPermission screen causes 9800 to freeze

I modified my code to do the invoke of the ApplicationPermissions, in an


invokeLater instead of an invokeAndWait, and it seems to solve my issue on the 9800.



Not sure if it will now break in older versions of the O/s.. still testing !



New Contributor
Posts: 3
Registered: ‎04-28-2010
My Device: -
My Carrier: programmer

Re: ApplicationPermission screen causes 9800 to freeze

Please help, I have no idea what is the error or cause of freeze screen on the device 9800,9810,9860 and 9900. I have tested on OS 6 simulator, but everything works fine. I am not sure what is the cause but I got message :


SUBJECT: ***BlackBerry World Notification - File Release Denied ***
Dear App World Vendor, 

While processing your application, for inclusion into BlackBerry App World I encountered the following issue(s) that require your attention before we are able to continue.

Please fix the following issue(s) and resubmit your application as a new release.

After installing your application on the BlackBerry Smartphone 9800, 9810, 9860 and 9900, when I tap the application icon, I get freeze screen on the devices.

Once these issue(s) have been corrected I will be able to complete the necessary steps that will allow this application to be posted in BlackBerry App World. If at any time you have questions regarding the above issue(s) please don’t hesitate to contact us at BlackBerryAppWorldRequests@rim.com or visit http://developer.blackberry.com/forums for technical support.


Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: ApplicationPermission screen causes 9800 to freeze

This is not necessarily the same problem as reported in this Thread.  You should start your own Thread with this problem.


In order to figure out what is causing this problem, you really need to try it on device.  What devices have you tested it on?