You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i've tested the flashlight with my Samsung Galaxy S5 and Phonegap build.
What i did:
Adding the following line to my config.xml: <gap:plugin name="cordova-plugin-flashlight" source="npm" />
In Javascript:
`window.plugins.flashlight.available(function(isAvailable) {
if (isAvailable) {
// switch on
window.plugins.flashlight.switchOn(
function() {}, // optional success callback
function() {}, // optional error callback
{intensity: 0.3} // optional as well
);
// switch off after 3 seconds
setTimeout(function() {
window.plugins.flashlight.switchOff(); // success/error callbacks may be passed
}, 3000);
} else {
alert("Flashlight not available on this device");
}
});`
Result: The light is switched on, then a short black screen and then the camera view and the german fault message "Warnung, Kamerafehler" (warning, camera fault).
Do you have an idea, what causes this crash?
Best regards
Daniel
The text was updated successfully, but these errors were encountered:
OK...should have said that i use the flashlight together with a camera plugin, means,
first i switch on the flash light and second the camera.
As soon as the camera viewer is shown, the error message is displayed.
But the flash light stays on.
Hi,
i've tested the flashlight with my Samsung Galaxy S5 and Phonegap build.
What i did:
Adding the following line to my config.xml:
<gap:plugin name="cordova-plugin-flashlight" source="npm" />
In Javascript:
`window.plugins.flashlight.available(function(isAvailable) {
if (isAvailable) {
Result: The light is switched on, then a short black screen and then the camera view and the german fault message "Warnung, Kamerafehler" (warning, camera fault).
Do you have an idea, what causes this crash?
Best regards
Daniel
The text was updated successfully, but these errors were encountered: