开发者

How to enable and disable the camera using the Android SDK?

开发者 https://www.devze.com 2023-02-14 07:41 出处:网络
I want to create a security application in which I want to disable the mobile camera when some event occurs.

I want to create a security application in which I want to disable the mobile camera when some event occurs.

开发者_如何转开发

As the user, I can disable the camera by going into settings. Can we do same thing in using code?


You could write code that opens all cameras and doesn't release them. As long as your app is running the camera won't be available to other apps, including the default camera picture taking thingamajig.


If you still need a right solution then use DevicePolicyManager.setCameraDisabled().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号