如何启用和禁用使用Android SDK的相机? [英] How to enable and disable the camera using the Android SDK?

查看:311
本文介绍了如何启用和禁用使用Android SDK的相机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创造,我要当一些事件发生时禁用手机拍照一个安全的应用程序。

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

作为用户,我可以通过进入设置禁用摄像头。我们可以做同样的事情在使用code?

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

推荐答案

您可以写,打开所有的摄像头,并且不释放他们code。只要你的应用程序运行时,相机将无法使用其他应用程序,包括默认的摄像头拍照thingamajig。

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.

这篇关于如何启用和禁用使用Android SDK的相机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆