Welcome!

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

Reply
New Developer
jaybb
Posts: 32
Registered: ‎03-06-2009
My Device: Not Specified

Any API to set Input Simulation Permission to Allow?

I'm developing in on OS 4.7 for the Storm.

 

Under Options>>Advanced Options>>App name>>Edit Permissions>>Interactions, there is an Input Simulation option that is set to "Deny" by default. I need it to be "Allow" in order for me to programmatically suppress some random "switch app" popups. I have an instruction within my app to ask the user to do it by himself, but that is cumbersome and people will probably not heed the tip.

 

Is there a way to programmatically set this permission to ALLOW?

 

thanks

Jay

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Any API to set Input Simulation Permission to Allow?

Have you reviewed the Application Permissions API?

 

You will find a sample included with the JDE. 

 

The key is the ApplicationPermissions.PERMISSION_.. permissions and reviewing quickly, I don't find one that matches what you want, but that is where I would start looking.

Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Any API to set Input Simulation Permission to Allow?

As per peter's suggestion, I found the key, which is ApplicationPermissions.PERMISSION_INPUT_SIMULATION;

 

Thanks! 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
New Developer
jaybb
Posts: 32
Registered: ‎03-06-2009
My Device: Not Specified

Re: Any API to set Input Simulation Permission to Allow?

Thanks. This API does not allow me to SET the value of the permission, it launches the Edit Permissions UI generically at the highest level, without zooming in to the particular permission specified in the call.
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Any API to set Input Simulation Permission to Allow?

Have you had a look at the Sample?  I thought you could specify in that which Permissions you wanted to ask for?
New Developer
lindapret88
Posts: 1
Registered: ‎07-15-2009
My Device: Not Specified

Re: Any API to set Input Simulation Permission to Allow?

I am not so knowledgeable about this matter. So i have to learn it. Thanks for the post.

 



[url=http://pret-auto.org][color=#FFFFFF][u]taux pret auto[/u][/color][/url]

New Developer
mhawk
Posts: 13
Registered: ‎07-18-2009
My Device: Not Specified

Re: Any API to set Input Simulation Permission to Allow?

ApplicationPermissions requestedPermissions = new ApplicationPermissions(); requestedPermissions.addPermission( ApplicationPermissions.PERMISSION_EVENT_INJECTOR ); appPermissionsManager.invokePermissionsRequest( requestedPermissions );

 

Here is a piece of sample code to prompt the user to enable the Event Injector permission