Flashlight-PhoneGap-Plugin icon indicating copy to clipboard operation
Flashlight-PhoneGap-Plugin copied to clipboard

flash light not work on android 4.2.2

Open ghost opened this issue 8 years ago • 2 comments

it works fine on more advanced android versions, but not on android 4.2.2 (tested on samsung galaxy trend) and no console error appear.

ghost avatar Jan 10 '17 11:01 ghost

So no crash, it just doesn't do anything?

I don't have a 4.2.2 device so can't help.

EddyVerbruggen avatar Jan 10 '17 11:01 EddyVerbruggen

no crash, i'm using ionic, this is the code:

$cordovaFlashlight.toggle().then( function (success) { flashlightIsOn = !flashlightIsOn; }, function (error) { console.log(error); });

when i'm debugging, its not enter success or error function and just skips, the $cordovaFlashlight looks fine (not undefined or something)

i tried this syntax: window.plugins.flashlight.switchOn( function() {}, // optional success callback function() {}, // optional error callback {intensity: 0.3} // optional as well ); same behavior.

thanks, Noam.

ghost avatar Jan 10 '17 11:01 ghost