Reputation: 1
Hi is there a way in the Android API to manually control the IR illuminators for the Doogee S61 pro night-vision camera? Trying to use a 3rd party camera app and I can access the IR camera but the IR LEDs do not turn on. It has flash control but this just turns on the flash for the main camera.
Poking around the built-in Camera app I found this bit of code which looks promising, but I cannot open the device /sys/class/flashlight_core/flashlight/flashlight_irtorch as my app doesn't have root permissions:
FileOutputStream fileOutputStream;
if (isFileExists("/sys/class/flash_irtouch/flash_irtouch_data/irtouch_value")) {
fileOutputStream = new FileOutputStream("/sys/class/flash_irtouch/flash_irtouch_data/irtouch_value");
} else {
fileOutputStream = new FileOutputStream("/sys/class/flashlight_core/flashlight/flashlight_irtorch");
}
if (z) {
fileOutputStream.write(49);
} else {
fileOutputStream.write(48);
}
fileOutputStream.flush();
fileOutputStream.close();
Upvotes: 0
Views: 30