Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 2
Registered: ‎09-10-2008
My Device: Not Specified

Programmically setting ITSecurity options without a BES?

Hi all,

I'm brand new to blackberry development and would like to begin with a project.  I'd like to be able to programmatically set the security options available on a Blackberry Pearl 8100 without relying on a BES server.  Preferrably the ones found under Options->Security Options->General Settings.  I've been reading the ITpolicy class via this link:


It indicates that the policy options can be read, but I'm unsure if there's a way to set/change a policy option using the class.


The other alternative that I've found is via the EventInjector class found via this link:


 It looks like it could be  possible via this method, but I would think it could get messy using wheel movements, especially when a user's icons could be located in different areas.  Also, the security of the device would need to be manually loosened on the BB to allow EventInjections to occur.

Does anyone have any suggestions or ideas that could point me in the right direction?  If this is possible, any example could would be greatly appreciated.



Posts: 41
Registered: ‎08-01-2008
My Device: Not Specified

Re: Programmically setting ITSecurity options without a BES?

[ Edited ]

I'm not sure if or how you can change those global settings, but any programmatic method which might exist will almost certainly rely on your application having permission to modify the device settings. You can do this by...



ApplicationPermissionsManager appPermMan =

ApplicationPermissions myPerms = appPermMan.getApplicationPermissions();


boolean result = appPermMan.invokePermissionsRequest(myPerms);

 Check the result variable for whether your request was successful (ie whether the user clicked yes on the popup screen that the invokePermissionsRequest() call causes).


Edit: doing it with Event Injection will be very hairy, and liable to completely break if the layout of the screen is ever changed in a future OS version. Do that only as a very very last resort.


Message Edited by malcolm on 09-10-2008 11:25 AM
BlackBerry Development Advisor
Posts: 15,884
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Programmically setting ITSecurity options without a BES?

It is not possible to programmatically modify IT Policy settings on a BlackBerry.  You could modify these settings through the use of event injection.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 2
Registered: ‎09-10-2008
My Device: Not Specified

Re: Programmically setting ITSecurity options without a BES?

Is it known how the BES server is able to set the policy items remotely and send them down to the device? If it can be done remotely via a BES, why not programmatically with code that exists on the Blackberry itself?