Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Block an Android Application from using a Permission

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...

like image 641
Abdullah Rasheed Avatar asked Jan 17 '23 04:01

Abdullah Rasheed


2 Answers

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

like image 100
Wesley Wiser Avatar answered Jan 29 '23 08:01

Wesley Wiser


I don't know of any non-rooted solutions, however there is an app on the android market called "Android Permission Blocker" that can block individual app permissions on an app basis. It only costs 99 cents so I tried it out and have been using it with success every since. Worth every penny in my opinion.

like image 20
Rob Avatar answered Jan 29 '23 06:01

Rob