rim:permit element

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 app (for example, accessing the GPS location or the camera).

Parent elements

<rim:permissions>

Child elements

None

Occurrences

One or more

Attributes

You can specify the following attributes:

Attribute Description
system The system attribute indicates that the specified permission is a system permission. Set system="true" to indicate a system permission.

Currently, the only permission that must be specified as a system permission is _sys_use_consumer_push.

Permissions

You can specify access to the following features:

Feature Permission
Camera

use_camera

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

Device information

read_device_identifying_information

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

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.

Microphone

record_audio

Allows this app to record sound using the microphone.

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.

Push

_sys_use_consumer_push

Allows this app to use push functionality.

Run in background

run_when_backgrounded

Allows this app to run JavaScript and networking in the background.

Your app can run in the background if you include the run_when_backgrounded permission or the blackberry.push feature ID in your configuration file.

Important: Use this feature sparingly and only when your app must perform processing in the background.

BBM Social Platform

bbm_connect

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

Email and PIN messages

access_pimdomain_messages

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

Contacts

access_pimdomain_contacts

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

Calendar

access_pimdomain_calendars

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

Notifications

post_notifications

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

Text messages

access_sms_mms

Allows this app to access text messages, including adding and deleting messages.

Example: Specifying permissions

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

<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>

Last modified: 2014-03-10



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

comments powered by Disqus