This class contains a set of constants whose names begin with PERMISSION_
(for example PERMISSION_BLUETOOTH). Each one of these "permissions"
refers to a particular subset of the API that can be restricted by that application control.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
JDE 4.2.1
Field Summary
static int
PERMISSION_BLUETOOTH
This permission controls an application's ability to send and receive data using Bluetooth, as well as access to
the supported Bluetooth profiles.
static int
PERMISSION_BROWSER_FILTER
This permission controls an application's ability to register a browser filter with the browser.
static int
PERMISSION_CHANGE_DEVICE_SETTINGS
This permission controls an application's ability to change configuration and user settings on the device.
static int
PERMISSION_CODE_MODULE_MANAGEMENT
This permission controls an application's ability to add and remove code modules and manage the installation
or deletion of applications.
static int
PERMISSION_EMAIL
This permission controls an application's access to the mail API and access to the user's mail store.
static int
PERMISSION_EVENT_INJECTOR
This permission controls an application's ability to inject events into the system.
static int
PERMISSION_EXTERNAL_CONNECTIONS
This permission controls an application's ability to send and receive data using exteneral connections.
PERMISSION_HANDHELD_KEYSTORE
This permission controls an application's ability to access the device key store and related API.
static int
PERMISSION_IDLE_TIMER
This permission controls an application's ability to reset the security timer, and by doing so, prevent the
device from locking.
static int
PERMISSION_INTER_PROCESS_COMMUNICATION
This permission controls an application's ability to share data and messages with other applications on the
device.
static int
PERMISSION_INTERNAL_CONNECTIONS
This permission controls an application's ability to send and receive data using connections routed through a
corporate network using the BlackBerry MDS Services.
PERMISSION_LOCAL_CONNECTIONS
This permission controls an application's ability to make local connections on the device through USB.
static int
PERMISSION_LOCATION_API
This permission controls an application's ability to access location-based services such as use of the GPS
radio.
static int
PERMISSION_MEDIA
This permission controls an application's ability to execute and manage multimedia files.
static int
PERMISSION_PHONE
This permission controls an application's ability to place and receive phone calls as well as access to phone
logs and phone data.
static int
PERMISSION_PIM
This permission controls an application's ability to access the PIM API and access to personal information
management stores such as contacts, tasks and events.
static int
PERMISSION_SCREEN_CAPTURE
This permission controls an application's ability to take screen captures (pictures) of the screen.
static int
PERMISSION_THEME_DATA
This permission controls an application's ability to register and provide theme information to the device.
static int
PERMISSION_WIFI
This permission controls an application's ability to send and receive data over the Wi-Fi link, as well as
access to information about the Wi-Fi network.
static int
VALUE_ALLOW
A constant representing a permission's value of "allow".
static int
VALUE_DENY
A constant representing a permission's value of "deny".
static int
VALUE_PROMPT
A constant representing a permission's value of "prompt".
This permission controls an application's ability to send and receive data using Bluetooth, as well as access to
the supported Bluetooth profiles.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_BROWSER_FILTER
public static final int PERMISSION_BROWSER_FILTER
This permission controls an application's ability to register a browser filter with the browser.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_CHANGE_DEVICE_SETTINGS
public static final int PERMISSION_CHANGE_DEVICE_SETTINGS
This permission controls an application's ability to change configuration and user settings on the device.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_CODE_MODULE_MANAGEMENT
public static final int PERMISSION_CODE_MODULE_MANAGEMENT
This permission controls an application's ability to add and remove code modules and manage the installation
or deletion of applications.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_EMAIL
public static final int PERMISSION_EMAIL
This permission controls an application's access to the mail API and access to the user's mail store.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_EVENT_INJECTOR
public static final int PERMISSION_EVENT_INJECTOR
This permission controls an application's ability to inject events into the system.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_EXTERNAL_CONNECTIONS
public static final int PERMISSION_EXTERNAL_CONNECTIONS
This permission controls an application's ability to send and receive data using exteneral connections.
Direct TCP and WAP are examples of external connections.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_FILE_API
public static final int PERMISSION_FILE_API
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_HANDHELD_KEYSTORE
public static final int PERMISSION_HANDHELD_KEYSTORE
This permission controls an application's ability to access the device key store and related API.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_IDLE_TIMER
public static final int PERMISSION_IDLE_TIMER
This permission controls an application's ability to reset the security timer, and by doing so, prevent the
device from locking.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_INTER_PROCESS_COMMUNICATION
public static final int PERMISSION_INTER_PROCESS_COMMUNICATION
This permission controls an application's ability to share data and messages with other applications on the
device.
Since:
JDE 4.3.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_INTERNAL_CONNECTIONS
public static final int PERMISSION_INTERNAL_CONNECTIONS
This permission controls an application's ability to send and receive data using connections routed through a
corporate network using the BlackBerry MDS Services.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_KEYSTORE_MEDIUM_SECURITY
public static final int PERMISSION_KEYSTORE_MEDIUM_SECURITY
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_LOCAL_CONNECTIONS
public static final int PERMISSION_LOCAL_CONNECTIONS
This permission controls an application's ability to make local connections on the device through USB.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_LOCATION_API
public static final int PERMISSION_LOCATION_API
This permission controls an application's ability to access location-based services such as use of the GPS
radio.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_MEDIA
public static final int PERMISSION_MEDIA
This permission controls an application's ability to execute and manage multimedia files.
Since:
JDE 4.3.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_PHONE
public static final int PERMISSION_PHONE
This permission controls an application's ability to place and receive phone calls as well as access to phone
logs and phone data.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_PIM
public static final int PERMISSION_PIM
This permission controls an application's ability to access the PIM API and access to personal information
management stores such as contacts, tasks and events.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_SCREEN_CAPTURE
public static final int PERMISSION_SCREEN_CAPTURE
This permission controls an application's ability to take screen captures (pictures) of the screen.
Since:
JDE 4.3.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_THEME_DATA
public static final int PERMISSION_THEME_DATA
This permission controls an application's ability to register and provide theme information to the device.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
PERMISSION_WIFI
public static final int PERMISSION_WIFI
This permission controls an application's ability to send and receive data over the Wi-Fi link, as well as
access to information about the Wi-Fi network.
Since:
JDE 4.3.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
VALUE_ALLOW
public static final int VALUE_ALLOW
A constant representing a permission's value of "allow".
If a permission is set to this value then it may use APIs controlled by the permission.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
VALUE_DENY
public static final int VALUE_DENY
A constant representing a permission's value of "deny".
If a permission is set to this value then it may not use APIs controlled by the permission.
Methods that are invoked when the corresponding Application Control is set to "deny" will
throw an exception.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
VALUE_PROMPT
public static final int VALUE_PROMPT
A constant representing a permission's value of "prompt".
If a permission is set to this value then it may use APIs controlled by the permission,
but the user will be prompted upon the first usage and potentially subsequent uses.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Constructor Detail
ApplicationPermissions
public ApplicationPermissions()
Creates a new empty ApplicationPermissions object.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Method Detail
addPermission
public void addPermission(int permission)
Adds a permission with the value VALUE_ALLOW.
If the specified permission has already been added
(that is, this.containsPermissionKey(permission) returns true)
then its value is overwritten with VALUE_ALLOW.
Parameters:
permission - the permission to add with the value VALUE_ALLOW; valid values
are any of the PERMISSION_ constants.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
containsPermissionKey
public boolean containsPermissionKey(int permission)
Returns whether or not a permission has been added.
A permission is considered to have been "added" if and only if it is contained in the
array returned from getPermissionKeys().
Parameters:
permission - the permission to test for having been added; valid values are any of the
PERMISSION_ constants.
Returns:
true if the specified permission has been added; false
otherwise.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
other - the ApplicationPermissions object to compare to this.
Returns:
the set of permissions in this object whose values are different than
those of other, as defined above, or an empty array if there is no such
difference; never returns null.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getPermission
public int getPermission(int permission)
Returns the value for a permission.
Parameters:
permission - the permission whose value to return; valid values are any of the
PERMISSION_ constants.
Returns:
the value of the specified permission; will be equal to one of the
VALUE_ constants.
Throws:
IllegalArgumentException - if permission is not a valid value or if
permission has not been added; that is,
this.containsPermissionKey(permission) returns false.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getPermissionKeys
public int[] getPermissionKeys()
Returns the set of permissions that have been added.
Returns:
the set of permissions that have been added, or an empty array if
none have been added; never returns null; each element of the returned array
will be equal to one of the permission constants defined in this class.
Since:
JDE 4.2.1
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.