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.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 6
Registered: ‎11-02-2011
My Device: Dev Alpha
My Carrier: Telkomsel

Problem with geolocation in webworks BB10

Hi, I am developing a BB10 application and it run well in Ripple emulator but the moment I tried in BB dev alpha device, the geolocation does not work and the app just hangs. I've tried both <rimSmiley Tongueermit>access_location_services</rimSmiley Tongueermit> and <rimSmiley Tongueermit>read_geolocation</rimSmiley Tongueermit> but nothing seems to work. In addition, when I check the application permission in my device (Security > App permission) my app is not listed although it asked for permission when I first started the application. 

 

Any thoughts?

Developer
Posts: 135
Registered: ‎09-25-2012
My Device: Dev Alpha
My Carrier: Rogers

Re: Problem with geolocation in webworks BB10

I takes a long time for me to get a GPS signal with the Dev Alpha A (almost 5 minutes). This is because I didn't use a SIM card with the device which most people will when they have it on their phone. 

 

You just need to wait a LONG time in an open area for the device to get a reading. Then your app should work. 

 

Good luck.

New Contributor
Posts: 6
Registered: ‎11-02-2011
My Device: Dev Alpha
My Carrier: Telkomsel

Re: Problem with geolocation in webworks BB10

Considering that geolocation is an async method, is it expected behaviour that app will just stall (not responding) until it receives a geolocation data? I honestly thought that it is some kind of permission issue, but maybe I'll try in an open area..

New Contributor
Posts: 6
Registered: ‎11-02-2011
My Device: Dev Alpha
My Carrier: Telkomsel

Re: Problem with geolocation in webworks BB10

Edit: I still think it is a permission issue because when I tried for geolocation access in the browser (not in the webworks app) I can get the data (or at least the waiting for location status). In the app it just freezes. In addition, in the Settings > Security > Application Permissions, I can't find my application there.
Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Problem with geolocation in webworks BB10

It should work and it should NOT take ages on a Dev Alpha to get a GPS lock. It takes seconds on mine.

 

Make sure you have:

 

<rimSmiley Tongueermissions>
<rimSmiley Tongueermit>read_geolocation</rimSmiley Tongueermit>

</rimSmiley Tongueermissions>

 

Uninstall the app, install it again. Maybe some weird glitch made it not give you the permissions?

 

Also, try enabling debugging (-d flag) and check the console for errors.

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App