I have an application that is using instascan to scan QR codes but every time you scan a QR code on an android phone an alert pops up with the decoded result. For example, if I generated a QR code with the text "I like bananas" then the alert would say "https://mywebsite.com says I like bananas".
Is there any way to stop this alert from showing? It doesn't happen on my laptop or tablet only my phone. Here is my code if you would like to see it:
<video id="preview" visible="true"></video>
<script type="text/javascript">
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
//When a QR code is detected
scanner.addListener('scan', function (content) {
//If it is a url
if (content.match(/^http?:\/\//i)) {
//Redirect to new page
window.open(content);
} else {
var options = {};
options.url = "CameraList.aspx/GetContent";
options.type = "POST";
options.data = JSON.stringify({ content });
options.dataType = "json";
options.contentType = "application/json";
options.success = function (result) { };
options.error = function (err) { };
$.ajax(options);
}
});
</script>
Any help is appreciated.