Specifying permissions

When you open the bar-descriptor.xml file in the Momentics IDE for BlackBerry, you can click the Application tab to see the list of permissions that you can add to your app. In the Permissions section, you can select check boxes that are associated with each permission that you want your app to have.

When you select a permission, the appropriate <permission> element is added automatically to the bar-descriptor.xml file. You can verify that the element was added by clicking the Source tab.

Screen showing the permissions check boxes in the bar-descriptor.xml file.

Some permissions are not available as a check box on the Application tab of the bar-descriptor.xml file. If you need to add these types of permissions to your app, you can click the Source tab and add the permission using the <permission> element. You can add only permissions that are available in the API level that your app uses.

<permission>access_notify_settings_control</permission>
<permission>access_wifi_public</permission>
<permission>_sys_run_headless</permission>
Warning: If you don't specify a permission that is required for your app, the user isn't prompted to grant your app the permission. If your app uses APIs that access restricted functionality without first requesting permission, the API returns errors. Your app must request permission to access all functionality that your app needs.