How to Block an Android Application from using a Permission

Abdullah Rasheed picture Abdullah Rasheed · Mar 19, 2012 · Viewed 8.5k times · Source

If an application has the "android.permission.CAMERA", and I wanted my app to block the use of this permission when it tries to access the Camera Hardware,"for security reasons" how could I block the process?

*NOTE: Let's assume that My app has all of the permissions...

Answer

Wesley Wiser picture Wesley Wiser · Mar 19, 2012

You need to use the Device Administration API. Starting with Android 4.0 you can disable use of the camera with setCameraDisabled