Application control policies enable administrators to perform the following actions:
- prevent users from installing and running applications on BlackBerry devices
- limit internal connections (connections behind a firewall)
- limit external connections
- limit local connections (serial, infrared, and USB connections)
- limit access to the key store
- limit access to particular APIs
You can determine whether an API is available for use on a BlackBerry device and request that the user change permissions, if necessary. In the following code sample, the application checks whether the application control settings permit access to location-based services. If the API is unavailable, the application prompts the user for permission to use this API.
ApplicationPermissionsManager appPermMgr =
ApplicationPermissionsManager.getInstance();
// Query the Location permission
int locationPermission = appPermMgr.getPermission(
ApplicationPermissions.PERMISSION_LOCATION_DATA );
if( locationPermission != ApplicationPermissions.VALUE_ALLOW ) {
// Build the permission request
ApplicationPermissions requestedPermissions =
new ApplicationPermissions();
requestedPermissions.addPermission(
ApplicationPermissions.PERMISSION_LOCATION_DATA );
// Invoke the request, the system takes over
appPermMgr.invokePermissionsRequest( requestedPermissions );
}
so ?
ReplyDeleteThanks for sharing such a valuable information. Blackberry Smartphones are used throughout the world and this blog enlighten some of the important facts about Blackberry App Development.
ReplyDelete