有没有办法在Android中获得(相机)的用户当前的Flash设置?

有没有办法在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...