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 Contributor
Zak1234
Posts: 5
Registered: ‎05-31-2012
My Device: Curve 9300

Prevent an Application from having Screenshots taken

Hi all,

Does anyone know of any way of preventing screenshots from being taken when my application is active? Basically my application displays sensitive information and I do not want another application to be able to caputre this information in the form of a screenshot.

If possible I would like to be able to do one of the following:

  • Detect in my applicaiton's code that a screenshot is about to be taken and remove the sensitive information from the screen
  • Prevent my screens or application from being screenshot through code
  • Detect if any applications have been granted the screenshot permission and detect when an application is granted the screenshot permission. Such that my application wont display sensitive information if this is the case


I know that a user has to accept the permission to allow an application to capture screenshots, Additionally I know it's possible to disallow through screenshots from being taken through IT policy in a BES environment. However, neither of these two solutions are acceptable.

 

Any help is greatly appreciated!

Please use plain text.
Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: Prevent an Application from having Screenshots taken

I don't know if there is a way to block a screenshot by use of the JDE/javaloader. But if you want to remove it through code, you can either disable all of the menu items and make your own custom menu or search for the screenshot menu items and remove those manually.
Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: Prevent an Application from having Screenshots taken

Agree with CMY.  Also since I believe that some packages use convenience keys and other approaches to initiating the screen capture, I am not sure that removing the menu items will help in all circumstances. 

Please use plain text.
New Contributor
Zak1234
Posts: 5
Registered: ‎05-31-2012
My Device: Curve 9300

Re: Prevent an Application from having Screenshots taken

Thanks a lot for the replies guys.

 

Yeh I'm aware that you can remove the menu items. My concern was more a malicious application that may run in the background taking screenshots or something similar. That's why I am looking for a way to prevent it in the application code.

Please use plain text.
Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: Prevent an Application from having Screenshots taken

I don't think that's possible since you can't control another application. But seeing as how you would have to grant network, screen capture, and possibly other permissions, I think the user would know if they have a screen capture application installed on their device. And none of the more prominent ones I've seen run automatically.
Please use plain text.