Android how to know if flashlight is on -


i using cameramanager , cameracharacteristics

i know how check if flashlight turned on

try bit of code

public boolean flashstatus() {       camera.parameters parameters = camera.getparameters();      if (parameters.getflashmode() == "flash_mode_torch") {         return true;     }      if (parameters.getflashmode() == "flash_mode_off") {         return false;     }  } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -