Android How To Know If Flashlight Is On
I am using CameraManager and CameraCharacteristics I would like to know how to check if the flashlight is turned on
Solution 1:
Try this bit of code
public boolean FlashStatus() {
Camera.Parameters parameters = camera.getParameters();
return parameters.getFlashMode() == "FLASH_MODE_TORCH";
}
Post a Comment for "Android How To Know If Flashlight Is On"