$cordovaFlashlight - flashlight undefined

So referencing http://ngcordova.com/docs/#Flashlight, the plugin is installed as normal - cordova plugin add https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git

$cordovaFlashlight is injected into the controller; ng-cordova is referenced correctly.

The following error is returned when referencing any of the $cordovaFlashlight methods such as $cordovaFlashlight.available() or even directly accessing $window.plugins.flashlight.available…

TypeError: Cannot read property ‘flashlight’ of undefined

I’ve tried reinstalling the plugin etc and checking the usual, but have run out of ideas.

A similar problem was listed here Can't get ngCordova recognizing camera/flashlight on Android but there was no response. Has anyone been able to get this working successfully?

Thanks

2 Likes

Have you found solution ?
I’m also getting this error, help me