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

Cannot find name 'mltext'. Did you mean 'Text'?ts(2552) lib.dom.d.ts(15438, 13): 'Text' is declared here. #4

Closed
indiascan opened this issue Oct 22, 2020 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@indiascan
Copy link

async recognizeImage(){

//this.newcamera();
navigator.camera.getPicture(onSuccess, onFail, { quality: 100, correctOrientation: true });

function onSuccess(imageData) {
mltext.getText(onSuccess, onFail,{imgType : 0, imgSrc : imageData});
// for imgType Use 0,1,2,3 or 4
function onSuccess(recognizedText) {
//var element = document.getElementById('pp');
//element.innerHTML=recognizedText.blocks.blocktext;
//Use above two lines to show recognizedText in html
console.log(recognizedText);
alert(recognizedText.blocks.blocktext);
}
function onFail(message) {
alert('Failed because: ' + message);
}
}
function onFail(message) {
alert('Failed because: ' + message);
}

@ChrisTomAlx ChrisTomAlx self-assigned this Oct 22, 2020
@ChrisTomAlx ChrisTomAlx added the question Further information is requested label Oct 22, 2020
@ChrisTomAlx
Copy link
Collaborator

Make sure the plugin was added correctly. Try cordova plugins and sent the output here.

Cheers,
Chris
Neutrinos

@indiascan
Copy link
Author

cordova plugin add cordova-plugin-ml-text
Plugin "cordova-plugin-ml-text" already installed on android.
Plugin "cordova-plugin-ml-text" already installed on browser.
Adding cordova-plugin-ml-text to package.json

if you can update your documentation or readme because
navigator.camera.getPicture() has been change now it's only camera.getPicture() and i am totally confused.
please help me out.
thanks in advance

@ChrisTomAlx
Copy link
Collaborator

If you are using ionic see the suggestion in #5 and also close this issue and lets continue the discussion there since I think its probably the same issue.

Cheers,
Chris
Neutrinos

@ChrisTomAlx ChrisTomAlx added the duplicate This issue or pull request already exists label Nov 17, 2020
@ChrisTomAlx
Copy link
Collaborator

Refer #6

Cheers,
Chris
Neutrinos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants