07-22-2012 09:53 AM - edited 07-22-2012 11:52 AM
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.
07-23-2012 02:21 PM
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
07-23-2012 04:19 PM
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.
11-07-2012 04:10 PM
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.