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
Contributor
appsbychris
Posts: 33
Registered: ‎01-17-2013
My Device: BB10 Dev Alpha Sim
Accepted Solution

BB10 Simulator geolocation failing

I am trying to get the current location with  navigator.geolocation.getCurrentPosition but it keeps failing.

 

Location services are turned on.

 

I get this error

 

PositionError{code: 2, message: "Location Manager offline", POSITION_UNAVAILABLE: 2, PERMISSION_DENIED: 1, TIMEOUT: 3}

 

I have included the correct permit:

 

 <rim:smileytongue:ermit>access_location_services</rim:smileytongue:ermit>

 

Also tried the playbook permit
  <rim:smileytongue:ermit>geo_location</rim:smileytongue:ermit>

 

But they both give me the error.

 

Any ideas?

 

Contributor
appsbychris
Posts: 33
Registered: ‎01-17-2013
My Device: BB10 Dev Alpha Sim

Re: BB10 Simulator geolocation failing

So it seems i've got it worked out!

 

after some digging through forum post, i found i needed to add

<rim:permissions>

 

block around the

<rim:permit>

 So now it looks like:

 

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

 And it works!