Help Center
Local Navigation
- Creating user interfaces
- Storing data
- Creating connections
- Managing applications
- Using custom messages and folders in the message list
- Applications for push content
- Localizing BlackBerry device applications
- Controlling access to APIs and application data
- Testing a BlackBerry device application
- Packaging and distributing a BlackBerry Java Application
- Glossary
- Provide feedback
- Legal notice
BlackBerry Manuals & Help
>
Documentation for Developers
>
Java Development Guides and API Reference
>
Development Guide - BlackBerry Java Development Environment - 4.7.0
Allow a BlackBerry device application to request access to resources
- Import the following classes:
- Create an instance of the ApplicationPermissions class.
ApplicationPermissions permissions = new ApplicationPermissions();
- Specify the build request to ask for event injection privileges.
permissions.addPermission( ApplicationPermissions.PERMISSION_EVENT_INJECTOR );
- Determine the access control settings that the BlackBerry® device user specifies.
if( ApplicationPermissionsManager.getInstance().invokePermissionsRequest( permissions ) ) { System.out.println( "The user saved equal, or more permissive settings" ); } else { System.out.println( "The user saved more restrictive settings" ); }
Parent topic: Application control