blackberry.system.hasPermission () in WebWorks 2.0?

Hello

I use Webworks 2.0 and I need to check if my application has permission to access shared files, 1.0 blackberry.system.hasPermission ('access_shared'), but this feature has been removed from 2.0.

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

The native API is only checked if you had given a function-specific URL access.

IE: If you put the following in your config file:

https://somedomain.com" subdomains="true">
  
  

It's not a way to verify permissions on the way to code. You must catch the error and respond within your application.

Tags: BlackBerry Developers

Similar Questions

  • problem or bug with blackberry.system.hasPermission ('location.maps')

    Hey all.  Can someone help me understand why this feature (see code below) does not work as it should?

    Copy the following code returns false on my 9900... Even if the card is activated (I have the icon on my home screen) and applications like foursquare and Poynt can use / make calls to BB Maps.  I can even call BBMaps within my own app if I ignore the result of this function

    function checkIfBBMaps(){
    
        var rslt = blackberry.system.hasPermission('location.maps'); 
    
        console.error("checkIfBBMaps:  rslt is:"+ rslt);
    
        if(rslt === true){
            return true;
        } else {
            console.error("checkIfBBMaps:  WE DONT HAVE MAPS");
            return false;
        }
    
    }
    

    Thoughts?

    I'm a * beep *!

    hasPermission()! = hasCapability().

    Oh wow.

    Time for me to get more coffee, I think!

    Edit: really?  the word'd i t i 0' is censored!  Wow.

  • BlackBerry.System.Model return undefined

    Hello

    I have an application based on sencha touch 2.1 and I add the webworks inside lib.

    When I try to get the device model using blackberry.system.model returning undefined.

    But other api such as blackberry.system.softwareVersion, blackberry.system.name, blackberry.connection.type works fine.

    Thank you & best regards

    Arun

    What operating system you test on? The model property is not supported in BlackBerry 10:

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.System.html#.model

    However, we have an API community for this here:

    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10/deviceInfo

  • blackberry.system.hasDataCoverage () - for help after getting out of the widget?

    My widget is a form that my users will initiate and complete when they are offline.

    I know to use the blackberry.system.hasDataCoverage function to check for network connection and if there isn't one, to save the entry from user to localstorage.

    I want to make the process as transparent as possible for them. If they fill out the form (and the data is saved to the localstorage), and exit the widget, is there a way to take advantage of the hasDataCoverge when they find connectivity?

    Hi, MMC,

    You can use the onCoverageChange event to see if something has changed http://www.blackberry.com/developers/docs/webworks/api/blackberry.system.event.html#.onCoverageChang...

  • (blackberry.system.event.KEY_BACK, handleBack): question in BB5.0

    Hi all

    Please take a look at my code. This code used for adding menuitem in Blackberry 5.0 ias

    try {}
    blackberry.system.event.onHardwareKey (blackberry.system.event.KEY_BACK, handleBack);
    function handleBack() {}
    Alert ("handle back button");
    }
    If (blackberry.ui.menu.getMenuItems () .length > 0) {}
    blackberry.ui.menu.clearMenuItems ();
    }
    var point = new blackberry.ui.menu.MenuItem (false, 1, "Exit", OnClickExitButton);
    blackberry.ui.menu.addMenuItem (item);
    } catch (e) {}
    Alert ('exception (addMenus): "+ e.name +"; ") + try ());
    }

    I am compiling my code in WW SDK 2.3. When running the application in BB 5.0 it gives "error refrence: handleBack is not defined,.»

    Same feature is added to the configuration file:


     
     

    Please let me know the solution. I'm stuck here, not able to add menuitem in my application.

    Define function handleBack() outside your try block and outside any function of the try block is in.

  • BlackBerry smartphones run a WebWorks BlackBerry application on the Tablet BlackBerry Simulator

    I followed all the steps on how to build a webwork application. I was able to compile.  Here is my syntax to compile the application: C:\Program Files (x 86) \Research In Motion\BlackBerry WebWorks SDK
    .1.0.6\bbwp>bbwp "c:\bbSample\index.zip" d o "c:\OutputDirectory".

    He created the .bar file in "c:\OutputDirectory\index.bar".

    I typed the below statement from a command prompt (cmd):

    C:\Program Files (x 86) \Research Motion\BlackBerry SDK SDK for Tablet WebWorks
    .1.0.6\bbwp\bin>BlackBerry-deploy - installApp-password - camera<>
    164.172.123 >-package "c:\OutputDirectory\index.bar".

    The system cannot find the specified file.

    What go wrong?

    I saw my problem.  I entered in what follows, and it worked.

    164.172.123 >-package "c:\OutputDirectory\index.bar".

    C:\Program Files (x 86) \Research Motion\BlackBerry SDK SDK for Tablet WebWorks
    .1.0.6\bbwp\bin>BlackBerry-deploy - installApp-device 192.164.172.123 - package "c:\OutputDirectory\index.bar" - password playbook.

  • How to get the Blackberry system infomation?

    Hi all.

    I want to get the following BB system infomation:

    String deviceModel;       example "BlackBerry Bold 9650"

    String OsVersion;          example "5.0.0".

    long memorySize;        the size of the RAM of BB
    long processorFre;     The BB processor frequency

    Can you tell me which functions can get them? Thank you!

    Please see the following for more information.

    http://www.BlackBerry.com/developers/docs/4.0.2api/NET/rim/device/API/system/deviceInfo.html

    http://supportforums.BlackBerry.com/T5/Java-development/how-can-i-get-the-total-RAM-size-in-BB-and-t...

    Best regards

    Albert Siu

  • BlackBerry | System.in

    I want my code to wait for input from the keyboard. In JAVA, I did using System.in. But I could find System.in in BlackBerry. I use Eclipse. Please suggest...

    You must have a user interface. in its basic form, it would be a white screen.
    You can override the keydown in screen to retrieve the keys.

  • Continuous integration (CIS) for BlackBerry systems

    Hi all.

    I'm looking CIS to buid blackberry application.

    Any help would be appreciated.

    Thank you.

    Checkstyle and findbugs are plugins for eclipse. not all parameters can be appropriate for blackberry development constraints, but you can of course find your own in no time.

  • Invoking the Application Permissions page?

    I've got access_shared + read_device_identifying_information permissions in my application

    I do a check at startup

    if(!blackberry.system.hasPermission("access_shared")) {
      // Output a message to the user
    
      // Close app button
      }
    

    This essentially shows the user a screen explaining the permission denied the app stops and tells them how to turn it on

    At this point, the only option that has the app is closed

    It would be better that I could add another choice for the user who opens the Permission request, ideally with this MyApp, so they can allow the permission required is as they wish

    I kniow there are a LOT of undocumented invoke / map "things you can do" but cannot work on special demand for it

    As required for B4BB this is a recipe that is useful for any developer WW Cookbook

    Looks like you can not go as far as you want to, but you can get close enough:

    https://developer.BlackBerry.com/HTML5/documentation/settings.html

  • BlackBerry Webworks and 'hardware back button '.

    Hello

    I have problem to apply the logic of my application with the "hardware back button.

    I use jquery mobile to create a phonegap for Blackberry WebWorks (Smartphone version) application.

    When I have a link in my page as:

    
    

    everything works fine.

    But when I use the WebWorks API to hook the hardware back button ' ' like this

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK,function() {
        history.back();
        return false;
    });
    

    my application is just closed. (I tested on 9800 OS6 Simulator and real device 9300 Curve 3 G with OS6)

    It is also strange, when I change the function of

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK,function() {
        alert('Debug');
        return false;
    });
    

    The alert dialog will appear and then my app will not be closed (to be correct)

    So the problem is the "history.back()" inisde () calling the onHardwareKey handler function

    Can someone help me more?

    Thank you

    I upldated my sdk to 2.1.1 and don't have the problem more on Simulator 9930. I think I got 2.1.0.24 front

  • BlackBerry 7 Webworks Documentation

    Hi guys

    Could someone point me in the direction of Blackberry 7 or earlier Webworks documentation. I had a quick glance, but I seem to keep coming back to the Blackberry Webworks 10 docs.

    See you soon

    Marcus

    Do not worry found...

  • Is taken in charge LocalStorage in smartphone WebWorks BlackBerry 6 and 7?

    on BlackBerry WebWorks® API Reference only is available for PlayBook in platforms supportedhttp://www.blackberry.com/developers/docs/webworks/api/localStorage.html

    And I think that works well in BlackBerry 6 and 7

    Hi Josep,

    According to this document, it is supported 6.0 +. I pointed out the inconsistency on github here.

  • Can we synchronize permission selected with the settings of operating system Notifications BB10 for our Application.

    Steps to follow:
    BB10 device--> settings--> Notifications--> Applications--> [name of your application]--> all alerts [Toggle button]

    I have an obligation to check whether or not 'All alerts' is allowed through settings when the application is running. To check if we can synchronize permission selected with the settings of operating system Notifications BB10 for my application. How to get javascript code if alerts permission is on / off, while the application is running.

    I tried adding the blackberry.system function and tried to hasPermission (blackberry.push) also, I can't determine if permission is allow / prohibit... Please suggest how to get that.

    I don't see a WebWorks API for this. If I expected to be anywhere, it's here:
    https://developer.BlackBerry.com/HTML5/APIs/beta/BlackBerry.notification.html#jbo1385148829097

    But it seems that this API has not been fully implemented; It may be useful to connect a developer Issue Tracker JIRA to get this feature added.

    At the same time, there is this API of Cascades that looks like what you're looking for:
    https://developer.BlackBerry.com/native/reference/Cascades/bb__platform__notificationapplicationsett...

    Write an extension for this feature should allow you to access this feature:
    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10-Cordova/template

    At the same time, a colleague is currently working on an extension that should open many features of Qt, and I think that the API above should be accessible through this extension. He must be released over the next week or two, so you can wait for that as well.

    EDIT: On this last point, see this extension which provides a mechanism for attaching in the majority of the Qt APIs.

    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10-Cordova/QtBridge

  • Set the Lockscreen Wallpaper (WebWorks)

    Hey,.

    is it possible in any way to set the wallpaper of the Lockscreen from Webworks application?

    The plugin system allows me only to regular wallpaper (blackberry.system.setWallpaper).

    We badly need this feature

    PS: it seems to be possible if I invoke the pictureeditor with option setwallpaper (she gives the Selector screen), but I will not have the option 'Save a copy' in there... is possible to refuse this option?

    ... it would be cool to have the same option for lockscreen as blackberry.system.setWallpaper.

    I would like to write my own plugin, but I can't c + c++ code / native

    Thank you

    I guess. @twindsor done made a great plugin model that might get you in the right direction at least. I would use the Yeoman version of generator.

    He talks more about it in this blog-> http://devblog.blackberry.com/2015/09/cordova-5-x-for-blackberry-10/

Maybe you are looking for

  • Top sites and the browser history

    Hi, I'm on a Macbook Pro 2011 running OS X Yosemite 10.10.5, with several people using my login information. My question is - I have a site on my Top Sites, but when I look in the browser history I don't see. This means that the browser history was d

  • Upgrade memory of satellite C50-A-157

    I am looking for the upgrade of memory and I need some advice. Please let me know if any of below works on my laptop? https://www.Amazon.co.UK/Corsair-CMS...ct_top?ie=UTF8 https://www.Amazon.co.UK/HyperX-IMPA.../DP/B00KQCOV5C My laptop: Satellite C50

  • Satellite 1900-203 - update the radeon driver?

    Hey,.I would like to know where to receive updates driver for ATI Mobility Radeon M6 pilot coz of updates my laptop crashes when I try to play games...

  • Satellite A500 - 19 X - no boot and removal of hard disk

    Hello I have a Satellite A500 - 19 X and I put it in mode 'sleep' earlier, I returned later to the laptop to get sleep when suddenly the screen went black. I rebooted the machine by holding the power button and it turned back. When I got to the logon

  • SUMIFS numbers for two conditions does not

    I'm trying to calculate totals based on the months using a SUMIFS, and I can't for the life of understand me I have income coming and based on it called the category and the date of receipt, I want to calculate totals for a given month.  Here is my t