Phonegap Plugins: Using camera with flashlight on

2

I need to know if it is possible or if there is a plugin that allows me to open the camera with the flash (or flashlight) on. I need this for a project, to check the location of the flash overflow. I've already tried several ways, using the cordova camera plugin together with the Flash plugin (EddyVerbruggen), but the camera error when turning on the flash. Any solution?

Image of error accessing camera with flash on:

    
asked by anonymous 18.06.2015 / 18:47

1 answer

1

Look, your question is very generic, you can not find out for sure what error 3 is. Probably if you look at the log in adb there should be more information about the error, however I did a quick read of the code of the plugin used EddyVerbruggen / Flashlight-PhoneGap-Plugin ) and realized that the plugin uses the camera to fix a problem with Nexus 5 (in addition to using a toggle function in the flash).

The problem is that it only gives a release of the camera after receiving an action to turn off the flash. I think that's why you can see the Camera Toast not found.

In any case, making modifications to the plugin (s) is very complicated, even if you are using Cordova to avoid Java, in this case the best solution is to use a plugin that best meets your need. Luckily with a 5minute search on Google I found the plugin below that allows you to take photos and activate the flash without any problems. Now you have the freedom to use all the plugins and switch between them for the most different actions.

link

    
24.06.2015 / 14:20