<rim:permit>

Syntax:

<rim:permissions>
    <rim:permit>permission_string</rim:permit>
</rim:permissions>

Description:

The <rim:permit> element specifies permission access to various features in a BlackBerry WebWorks application (for example, accessing the GPS location or the camera).

You must include the following namespace declaration in the top-level <widget> element to use the <rim:permit> element:

xmlns:rim="http://www.blackberry.com/ns/widgets"

Occurrences:

One or more.

Parent elements:

<rim:permissions>

Child elements:

None.

Content:

A string value representing a valid permission value. See the list of Permissions below for more information.

Attributes:

You can define the following attributes for this element:

Attribute Description
system Optional. Some permissions are system permissions. You set system="true" to indicate a system permission.

In the list below, the only permission that must be specified as a system permission is _sys_use_consumer_push.

Permissions:

The following table identifies the available permissions for WebWorks plugins, which are required to access specific native functionality or capabilities.

This list of permissions represents only those permissions that may be required when adding the WebWorks or Cordova plugins that are installed with the BlackBerry 10 WebWorks SDK. Custom plugins may require permissions that are not listed here. For example, to use a custom plugin that accesses the device's microphone to record audio, you must add the record_audio permission. For a complete list of native app permissions, see App permissions in the BlackBerry 10 Native SDK documentation.

Functionality or Capability Permission value Description
Access the data lock operational folder

access_operational_data_domain

Allows this app to access files in the data lock operational folder. The permission only applies to apps that are data lock aware. For more information about data lock, see Creating apps that are data lock aware.

Access the data lock startup folder

access_startup_data_domain

Allows this app to access files in the data lock startup folder. The permission only applies to apps that are data lock aware. For more information about data lock, see Creating apps that are data lock aware.

BBM Social Platform

bbm_connect

Allows this app to connect to BBM so that users can chat or update their BBM profile without leaving the BBM connected app.

Calendar

access_pimdomain_calendars

Allows this app to access the calendar, including viewing, adding, and deleting appointments.

Camera

use_camera

Allows this app to take pictures, record video, and use the camera's flash.

Contacts

access_pimdomain_contacts

Allows this app to access contacts, including viewing, creating, and deleting contacts.

Device information

read_device_identifying_information

Allows this app to access device identifiers such as serial number and PIN.

Email and PIN messages

access_pimdomain_messages

Allows this app to access email and PIN messages, including viewing, creating, sending, and deleting messages.

Location information

access_location_services

Allows this app to access the device’s current or saved locations. This permission replaces read_geolocation, and includes access to location information from GPS, Wi-Fi, and cell ID.

Notifications

post_notifications

Allows this app to post a notification to the notification area of the screen.

Push

_sys_use_consumer_push

Allows this app to use push functionality.

You must include the system="true" attribute when you add this permission.

Run headless

_sys_run_headless

Allows this app to run when it is not visible to the user.

Use this feature sparingly and only when your application must perform processing in the background.

Run in background

run_when_backgrounded

Allows this app to run JavaScript and networking in the background. The app appears as an active frame on the device.

Your app can run in the background either by including the run_when_backgrounded permission, or by adding the com.blackberry.push plugin.

Use this feature sparingly and only when your application must perform processing in the background.

Shared files

access_shared

Allows this app to access pictures, music, documents, and other files stored on the device, at a remote storage provider, on a media card, or in the cloud.

Example:

The following example demonstrates how to set the permissions for reading and writing files, recording audio, accessing camera data, and push.

<widget xmlns:rim="http://www.blackberry.com/ns/widgets">
.
.
.
    <rim:permissions>
        <rim:permit>access_shared</rim:permit>
        <rim:permit>record_audio</rim:permit>
        <rim:permit>use_camera</rim:permit>
        <rim:permit system="true">_sys_use_consumer_push</rim:permit>
    </rim:permissions>
<widget>

Last modified: 2015-03-19



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus