有没有办法在Android中获得(相机)的用户当前的Flash设置? [英] Is there a way to get the users current Flash settings (for the camera) in Android?
本文介绍了有没有办法在Android中获得(相机)的用户当前的Flash设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以从原生相机应用闪光灯设置编程?
Can we get the flash settings from the native camera app programmatically?
我的意思是说,例如,如果用户在默认相机应用的闪光模式插手,我要为阅读闪光模式由他设置我的应用,这是在后台运行的的。这可能吗?
I mean to say, for example, if the user meddles with the flash modes in the default camera app, I want to read the flash mode set by him on my app, which is to run in the background. Is this possible?
推荐答案
为了获得当前的闪光模式,Harshit先生建议,你需要getFlashMode()。为了得到同样的,你可能会使用以下code
In order to get the current flash mode, as Mr. Harshit suggested you need to getFlashMode(). For getting the same you may use the below code
Parameters params;
Camera cam;
cam=Camera.open();
params=cam.getParameters();
System.out.println(params.getFlashMode());
试试这个,看看这个工程...
Try this and see if this works...
这篇关于有没有办法在Android中获得(相机)的用户当前的Flash设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文