Open Clankey opened 7 years ago
I have a similar problem on iOS, if the light was turned on by another app this .isSwitchedOn()
returns false. This is because the .isSwitchedOn()
method returns the internal status of the light, assuming it will always be turned on/off using this plugin.
The solution is to query the light status for every call to .isSwitchedOn()
.
I have similar issue, isSwitchedOn() return false always until I execute toggle() function. If I never run any other function than isSwitchedOn() then it always returns false. Any update @Clankey @john-doherty @EddyVerbruggen @IagoSRL @cooper1388
@akashbiz Please don't ping people. Instead, take a look at the code and try to come up with a solution.
The plugin isn't able to identify correctly if the flashlight in on or off. If I turn on the flashlight by the android button or widget, the function will always return false. It only returns true if I use window.plugins.flashlight.switchOn(); to turn on