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
{{ message }}
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
I'm trying this on a complete fresh install. I'm using iOS 16, Newest Android OS xCode 14 and capacitor v5, The qr scanner works only flash doesn't this is the current code:
On iOS the torch turns on and then off as soon as the camera view starts, on android it doesn't turn on at all.
BarcodeScanner.hideBackground(); // make background of WebView transparent
BarcodeScanner.enableTorch();
const result = await BarcodeScanner.startScan(); // start scanning and wait for a result
// if the result has content
if (result.hasContent) {
document.getElementById("pusher").style.display = "block";
document.body.style.background = "";
document.body.style.opacity="1";
console.log(result.content); // log the raw scanned content
}
}
startScan();`
The text was updated successfully, but these errors were encountered:
This will not work, you need to use startScanning and enable your torch after this call.
startScan will reset the camera-view and therefore disable the torch, this is unfortunately not so easy to fix with the current implementation. Maybe it works if you call prepare before your enableTorch call, but unfortunately I cannot test it at the moment.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying this on a complete fresh install. I'm using iOS 16, Newest Android OS xCode 14 and capacitor v5, The qr scanner works only flash doesn't this is the current code:
On iOS the torch turns on and then off as soon as the camera view starts, on android it doesn't turn on at all.
` const startScan = async () => {
document.body.style.opacity="0.2";
document.body.style.background = "transparent";
document.getElementById("pusher").style.display = "none";
The text was updated successfully, but these errors were encountered: