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
New Contributor
rpaskowitz
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Location Services w/ WebWorks on Dev Alpha

Are Location Services expected to be working on the Dev Alpha with WebWorks?

 

I have the following in my config.xml

 

<rim:permissions>
 <rim:permit>access_location_services</rim:permit>
</rim:permissions>

and in my Javascript&colon;

navigator.geolocation.getCurrentPosition(geolocationSuccess, geolocationError, options);

 Everything works fine in Ripple, but when I run on the Dev Alpha, geolocationError get's called and the error message is "User denied Geolocation".

 

My app is signed, and after loading and launching, I was given the prompt to authorize Location for the app, which can be confirmed in the Security -> Application Permissions screen. The overall Location Services is also enabled under Location Services in Global Settings.

 

Please use plain text.
Contributor
marcderosa
Posts: 12
Registered: ‎02-17-2012
My Device: developer
My Carrier: developer

Re: Location Services w/ WebWorks on Dev Alpha

Although it doesnt help you much I can at least confirm that the dev simulator  gives me the exact same location error as you are getting. I have the same <rim:smileytongue:ermit> settings as you and according to the documentation that should be enough to open permissions. I dont have a BB10 phone handy so I wont know until later in the day if it is just a simulator issue or if it will be a phone issue as well. At least for now I believe you are running into a simulator issue. Ill update when I find out more

 

 

Please use plain text.
Contributor
marcderosa
Posts: 12
Registered: ‎02-17-2012
My Device: developer
My Carrier: developer

Re: Location Services w/ WebWorks on Dev Alpha

[ Edited ]

I just got news from a co-worker with a BB10  phone that. location info  is denied on the phone as well. I had him check the settings for the application (pemission enabled) and I had him check Location Services (enabled) .

Sorry not a solution, but it is one more data point.

One would think that the permissions functionality has been tested by BB (???) so we must be doing something wrong (??) however, if there is more to do to get location information its certainly not documented anywhere.

Let me know if  you find anything out...

Please use plain text.
New Contributor
rpaskowitz
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Re: Location Services w/ WebWorks on Dev Alpha

I just upgraded my Dev Alpha to the new 10.0.9.1103 release, and repackaged my app with the 1.0.3.8 WebWorks release. Now I get error 2 instead, Location Manager offline.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,523
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Location Services w/ WebWorks on Dev Alpha

Hi there, can you please confirm that Location services are turned on in your settings? Settings > Location Services. Also, just as a sanity check, can you ensure that you perform a test with a clear view of the sky? (Just to rule out environmental issues.)


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
rpaskowitz
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Re: Location Services w/ WebWorks on Dev Alpha

I did have the main Location Services enabled, but will test again later today.

 

I was definitely not in clear sky, but then I would have expected after some time getting PositionError.TIMEOUT and not PositionError.POSITION_UNAVAILABLE which sounds more like it is unable to 'attach; to the location service.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,523
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Location Services w/ WebWorks on Dev Alpha

Agreed, it was more of a "let's rule it out" suggestion. I haven't seen that error myself yet, but I'll do some tests on my end.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
rpaskowitz
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Re: Location Services w/ WebWorks on Dev Alpha

Thanks. I'll also look at giving my app a try in the Simulator to see if I get any different results.

 

One thing I noticed with an app I installed on the Dev Alpha is that it requested and got Location and GPS Location privileges, while my app only prompted for Location. I believe that other app is Native or AIR. Is this possibly just a piece of legacy between PlayBook and BB10?

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,523
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Location Services w/ WebWorks on Dev Alpha

[ Edited ]

There may be a difference in how the request is being made, and checking the rim:smileytongue:ermit documentation, there are two possibilities:

https://developer.blackberry.com/html5/documentation/rim_permit_element.html

 

PlayBook

read_geolocation

 

 

BB10

access_location_services

 

You are using the correct BB10 element that the docs are stating. However, based on this sample:

https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/Maps/config.xml

 

The author actually used read_geolocation and I have seen that sample work properly. Can you please try subbing in the PlayBook permission in place of the BB10 permission? If this resolves the issue, we'll need to log a bug against WebWorks to accept the appropriate flag.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
rpaskowitz
Posts: 8
Registered: ‎11-12-2012
My Device: 9800
My Carrier: Koodo

Re: Location Services w/ WebWorks on Dev Alpha

I've switched to read_geolocation and got a prompt for GPS Location on first launch. Attempting to get location now results in the location indicator showing up on the status bar/ribbon on the home screen and no immediate failure but instead a long wait while it tries to get a fix. Now I just need to set a timeout in my PositionOptions.

 

Thanks for the help. Looks like WebWorks didn't get the memo about the new permission name :smileyhappy:

Please use plain text.