EventInjector on BlackBerry to close the camera - a security risk?

we use our own BlackBerry camera in our application, using the Invoke class to launch the camera. We listen to how the image is written to the file system, and when the user ends with the camera, we call

Application.getApplication().requestForeground(); 

inside the JournalChanged () file to return to our application.

This caused a problem with the camera holding the image for some time on some devices. If you want to browse gory, you can see my post on the BB forums after a while.

http://supportforums.blackberry.com/t5/Java-Development/restore-invoked-camera-after-deleting-an-image-from-the/mp/511332

Suffice it to say, I'm still trying to fix it. Using EventInjector to enter an ESC key press works, however in this matter

Obtaining event injector permission

he is described as a security risk. However, this is widely suggested as a way to close the camera and solve other problems. Has anyone had problems using this method to close the camera or do something else? Is there a better “best practice” way to close the camera since it seems to be on Android (I don’t know at all, said the senior developer here)?

By “problems,” I assume that I really mean business rules, types of problems ... the application gets a blacklist in the organization, is shut down in the application store, etc.

Thanks in advance, it bothered me for a while.

+7
security blackberry
source share
1 answer

I think the biggest problem that you will encounter is that you need special permissions for applications to use application injection - ApplicationPermissions.PERMISSION_INPUT_SIMULATION . Starting with the provision of the application, this permission in principle allows you to simulate input events in ANY application at any time, this is considered very dangerous, because a poorly written or intentionally malicious application can cause great damage. Therefore, many end users and businesses do not allow applications that require this permission.

+1
source share

All Articles