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
DirkLuys
Posts: 123
Registered: ‎02-13-2012
My Device: Z10 LE
Accepted Solution

blackberry.system.hasPermission() in WebWorks 2.0?

Hi

I'm using Webworks 2.0 and I need to check whether my app has permission to acces shared files, in 1.0 blackberry.system.hasPermission('access_shared'), but this function has been removed from 2.0.

Is there a function to replace this check? I can't seem to find it.

Please click the like button if my post helped you! Thank you.
BlackBerry Development Advisor
twindsor
Posts: 832
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: blackberry.system.hasPermission() in WebWorks 2.0?

Hi,

 

I'm checking into why this has been removed.

Tim Windsor
Open Source Technical Lead
BlackBerry Development Advisor
twindsor
Posts: 832
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: blackberry.system.hasPermission() in WebWorks 2.0?

The original API only checked if you had given a specific URL access to a feature.

 

Ie: if you had put the following into your config file:

 

<access uri="https://somedomain.com" subdomains="true">
  <feature id="blackberry.app" version="1.0.0.0" required="true"/>
  <feature id="blackberry.invoke" version="1.0.0.0" required="true"/>
</access>

 There isn't a way to check for individualt permissions through code. You should catch the error and respond to it within your app. 

Tim Windsor
Open Source Technical Lead