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

New Developer
Posts: 9
Registered: ‎11-12-2008
My Device: Not Specified

Im irritated in the way some apis works in similator and with device?

[ Edited ]

Hey All,


Something works in with simulator but not with the real device, why? Why the apis not works the way it should work. let me give an example with os 4.2.1, whats wrong with this codes, since jde4.2.1 expose it to use? it from



ApplicationPermissions original = ApplicationPermissionsManager.getInstance().getApplicationPermissions();
        if( original.getPermission( ApplicationPermissions.PERMISSION_EVENT_INJECTOR ) == ApplicationPermissions.VALUE_ALLOW &&
            original.getPermission( ApplicationPermissions.PERMISSION_PHONE ) == ApplicationPermissions.VALUE_ALLOW &&
            original.getPermission( ApplicationPermissions.PERMISSION_CHANGE_DEVICE_SETTINGS ) == ApplicationPermissions.VALUE_ALLOW &&
            original.getPermission( ApplicationPermissions.PERMISSION_EMAIL ) == ApplicationPermissions.VALUE_ALLOW ) {
                // All of the necessary permissions are currently available. 


// Create a permission request for each of the permissions your application needs.
        // Note that you do not want to list all of the possible permission values since that provides
        // little value for the application or the user.  Please only request the permissions
        // needed for your application.
        ApplicationPermissions permRequest = new ApplicationPermissions();
        permRequest.addPermission( ApplicationPermissions.PERMISSION_EVENT_INJECTOR );
        permRequest.addPermission( ApplicationPermissions.PERMISSION_PHONE );
        permRequest.addPermission( ApplicationPermissions.PERMISSION_CHANGE_DEVICE_SETTINGS );
        permRequest.addPermission( ApplicationPermissions.PERMISSION_EMAIL );
        boolean acceptance = ApplicationPermissionsManager.getInstance().invokePermissionsRequest( permRequest );
        if( acceptance ) {
            // User has accepted all of the permissions.
        } else {
            // The user has only accepted some of the permissions requested.  In this sample, we will
            // not perform any additional actions based on this information. However, there are several
            // scenarios where this information could be used.  For example, if the user denied networking
            // capabilities then the application could disable that functionality within their application
            // if it was not core to the operating of the application.




let me know whats wrong in this code

why is it not behaving the way I wanted in jde4.2.1 and my device is 8703e




really irritated working with RIM apis

thnx again


Message Edited by kkdave on 12-12-2008 12:23 PM
Message Edited by kkdave on 12-12-2008 12:25 PM
Message Edited by kkdave on 12-12-2008 12:26 PM
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Im irritated in the way some apis works in similator and with device?

I can tell you from my experience that the ApplicationPermissions setting on 4.2.1 "appears" to work correctly, but after the user reviews the settings and selects "Save", the permissions still have the original values and our applications fail anyway. This has been the single most irritating problem we have, and accounts for probably 40% of our support call volume.


I reported this issue to RIM some months ago and it was acknowledged as a bug. The problem appears to have been fixed in 4.3 and later versions.

New Developer
Posts: 9
Registered: ‎11-12-2008
My Device: Not Specified

Re: Im irritated in the way some apis works in similator and with device?

But it should not the way with works. my 10000 devices is depending on it it and how can i get solution upon it

if it dint behave in the way it should. m i ve to bankrupt using RIM and not IPHONE?

its where they ve to expose their apis when it can may work. I thing i ve to file a case against RIM?, im never worried with how sw works but really worried when it cant deliver the way it exposed. I like to hear more words from RIM people like SHOM.


with thanx

and from now no thanx

Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Im irritated in the way some apis works in similator and with device?

Since I spend most of my day reading and writing less coherent rants than your own, and as a frequent critic of just about everything myself who hates wasting time on deadends, please allow me to respond.


The standard disclaimers talk about stuff like suitability or fitness for a particular purpose.

AFAIK, most of the RIM software is free and no product is perfect. Whenever you or anyone else tries

to make something work, "stuff" happens that usually isn't good. Supporting one product

can be tough but expecting to have flawless portable support for an entire product line,

where each product was developed to hit a newly available niche with new technology, is

quite difficult.


What always annoys me is when artficial barriers are put up that cause avoidable time wastes while contributing nothing of economic value- neither helping us work nor protecting a RIM or OEM market or intellectual product.




Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Im irritated in the way some apis works in similator and with device?

kkdave - Don't jump off of a building!


There is a work around - you can query the Application Permissions on 4.2.1 using ApplicationPermissionManager, then put up a dialog that explains the steps to fix the issue if the permissions won't work for your application.


As marchywka says, we have a much more challenging environment than the iPhone, which has been out maybe 1 year and has only one device with two variations, with one display, one network, one carrier, etc. we have 20 devices, dozens of networks, probably 50 flavors of OS out in the wild, etc. Once an OS release hits the wild, it't out there for good, for the most part. RIM can fix bugs all day long but 98% of users never update their OS level.