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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
bryfox
Posts: 15
Registered: ‎11-01-2010
Accepted Solution

hasCapability - location.maps

My app makes the following call:

 

blackberry.system.hasCapability('location.maps')

 

I assumed that this would tell me if BlackBerry Maps were available on the device. In other words, if I could call `blackberry.invoke.MapsArguments` without seeing a java.lang.RuntimeException.

 

However, on every device I've tested (OS 5 and OS 6), the hasCapability call returns false -- even if I can then invoke the maps app. Is there another way to tell if maps are available before trying to invoke them?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

Re: hasCapability - location.maps

Hi bryfox,

 

It appears you have uncovered a bug that we have since fixed.  The fix to this API will be available likely around the middle of March sometime.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
bryfox
Posts: 15
Registered: ‎11-01-2010

Re: hasCapability - location.maps

Thanks Tim.

 

I assume users will have this fix when they upgrade their OS (but not until then)?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

Re: hasCapability - location.maps

You won't have to upgrade your OS to get this fix :smileyhappy:
Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

Re: hasCapability - location.maps

We are actually in the process of extracting all the APIs off of the Operating System and bringing them into the open source project.  This will make it so that we have very little ties to the OS.  As a result, we really shouldn't have to wait for any OS updates for fixes in our APIs.

 

Of course, there may be the case where an underlying bug on the OS is blocking us from fixing an issue, but we want to minimize this risk as much as possible.

 

Some more details on our "Evacuation"

 

https://github.com/blackberry/WebWorks/wiki/Current-Work-Items

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
bryfox
Posts: 15
Registered: ‎11-01-2010

Re: hasCapability - location.maps

That's really exciting news... thanks for the link.

Please use plain text.