Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main Exeption Android #47

Open
dreamslabmg opened this issue Jul 6, 2023 · 0 comments
Open

Main Exeption Android #47

dreamslabmg opened this issue Jul 6, 2023 · 0 comments

Comments

@dreamslabmg
Copy link

i dunno why but i have this "main loop exeption" with an alert when i run the feature please help me

This is my code:
if (/Android/i.test(navigator.userAgent)) {
navigator.camera.getPicture(onSuccess, onFail, {
quality: 100,
destinationType: Camera.DestinationType.DATA_URL ,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
correctOrientation: true,
});

function onSuccess(imageData) {
var image = document.getElementById('render');
image.src = "data:image/jpeg;base64," + imageData;
image.style.display = "flex";
prinscatta.style.display = "none";
textocr.recText(4,imageData,onSuccess,onFail);
function onSuccess(recognizedText)
{
testoiniziale2 = recognizedText;
console.log(testoiniziale2);
boxtraduzione2.value = recognizedText;
alert(recognizedText);
}
function onFail(message)
{
alert(message);
}
}

function onFail(message) {
window.plugins.toast.showWithOptions(
{
message: message,
duration: "short",
position: "bottom"
}
);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant