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.

Reply
New Contributor
mvolution
Posts: 3
Registered: ‎09-13-2012
My Device: all
My Carrier: o2

Problem with net.rim.device.api.lbs.Locator.geocode

After calling "net.rim.device.api.lbs.Locator.geocode(String freeformString, Coordinates startCoords)" we get a error message "net.rim.device.api.system.ControlledAccessException" while trying to geocode an address.

 

Do we have to set special Enterprise rules for that call? If yes, what and where?

 

Thanks

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem with net.rim.device.api.lbs.Locator.geocode

This is likely called by the app not having permissions set appropriately. If your application requires special permissions then it would be recommended to request those permissions programmatically when the app is first run.

 

It is possible that the BES has rules in place to prevent LBS APIs from being used, but I would recommend checking the app permissions on the device first.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
mvolution
Posts: 3
Registered: ‎09-13-2012
My Device: all
My Carrier: o2

Re: Problem with net.rim.device.api.lbs.Locator.geocode

Thanks for the reply. However we don't know what permission for this API call is necessary and what IT policy must be set by the BES admin in order to grant those permissions. There is no documentation regarding this issue...

 

Stefan

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem with net.rim.device.api.lbs.Locator.geocode

Hi Stefan,

 

The app is trying to access the location of the device, so you need to have the "Location Data" permission of the application enabled. 

 

There are many docs about permissions, both device side and server side.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
mvolution
Posts: 3
Registered: ‎09-13-2012
My Device: all
My Carrier: o2

Re: Problem with net.rim.device.api.lbs.Locator.geocode

Hi Garett, thanks for your fast reply.

The call doesn't access the location of the device. Locator is a geocoding service that allows you to obtain location information for an address.

Any help to us?

Stefan
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem with net.rim.device.api.lbs.Locator.geocode

Hi Stefan,

 

Request app permissions, there is an applicationpermissionsdemo sample included with all Java Development tools that shows how this can be done. Alternatively try enabling all permissions and see if the issue goes away.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.