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
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

BB10 - navigator.geolocation.watchPosition - event bugs/issues

[ Edited ]

Hi,

 

I'm playing around with the Dev Alpha and the BB10 WebWorks APIs. In this case I'm requesting the "navigator.geolocation.watchPosition" event to get the actual GPS position of the device. The app, when installed, asked for the permissions, so I have already permit the GPS-Position for Geolocation, but when calling the screen within my Test app it asks again like in the browser when visiting a page using Geolocation API. I think this is a bug, isn't it?

 

 

Next issue is the update of the GPS location from the event. I only get a responding event every ~10 seconds and with that is is very slow and for the future very useless.

 

 

Regards.

 

IMG_00000027.png


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - navigator.geolocation.watchPosition - event bugs/issues

The app should initially prompt the user to accept the permission at startup.  This prompt comes from the fact that you included the 'geolocation' permission in the config.xml file.

 

After that, it should prompt you once more when an actual request to GPS occurs.  If you hit "accept", then it shouldn't prompt you again.

 

Are you saying that after clicking 'accept', you get continuously prompted?  If so yes, that sounds like a bug.  Given that, would you pls provide a code snippet to reproduce the behavior.  You are also welcome to submit this as a bug here 

https://www.blackberry.com/jira/secure/Dashboard.jspa

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - navigator.geolocation.watchPosition - event bugs/issues

Hi,

 

thx for your response Adam. The permission is set in config.xml, the App prompts to access those permission when installed first time, so it shouldn't ask again within the app itself. The shown screenshot seems to be same when using a webpage that asks for permission to access my geolocation.

 

For now I can reproduce it and the prompt comes up every time I open up my app and start the geolocation screen of it. So it seems I need to file my next bug to the Dashboard. There is also another issue/bug with the geolocation API events since the "navigator.geolocation.watchPosition" handler only fires an event every ~10 seconds, there is no way to get much more responsiveness from the API.

 

Regards.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
RileyGB
Posts: 284
Registered: ‎08-06-2010
My Device: Z10

Re: BB10 - navigator.geolocation.watchPosition - event bugs/issues

Any updates on this?

 

I'm experiencing the same issues when using navigator.geolocation.getCurrentPosition. Every time the app is launched, the user is prompted to allow the geoLocation request.

 

 



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Please use plain text.