11-11-2013 12:24 PM
I have an app that uses LocationProvider.getInstance and it works fine on non-BES devices installing using the browser. However when I deploy via a BES synced device I get a ControlledAccessException.
All the configs like the app control policy and device policy are set to not disable the Location permission and indeed I use ApplicationPermissionsManager to check and request the permission if it isn't granted on device. It is allowed and still I get the ControlledAccessException. I try disabling and enabling the permission manually but it still doesn't work. I've tried other approaches such as using a global event as mentioned elsewhere. I've tried invokeAndWait to request on the main thread and before enterEventDispatcher like in the GPSDemo in the doc.
I can get a location when using the settings app and selecting refresh GPS. The built in maps work fine.
Is there a bug in BB OS 7 in relation to this? I think it worked on 188.8.131.526 on a 9720 but I get the exception on 184.108.40.2066 on a 9320.
11-15-2013 07:38 AM
Hmm I get this on BB OS 5 as well.
Not sure if it is related to turning a prosumer into a BES device or the firmware build settings - the one that worked is a Carphone Warehouse firmware, the others are Orange.
11-15-2013 07:59 AM
If I were swapping a consumer to BES device, or the other way round, I think I would wipe the device completely before attempting to use it in the new environment. Here is how:
I appreciate the document is focused on Enterprise to consumer, but I would think the reset to factory would also be useful in this circumstance just to be sure there is nothing 'hanging over'.
Just a thought, never done this myself.