I am having issue with the ionic document scanner (https://ionicframework.com/docs/native/document-scanner) which packaged the cordova-plugin-document-scanner (https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner).
I am running this piece of code (copied from documentation)
ngAfterViewInit() {
this.platform.ready().then((readySource) => {
console.log('Platform ready from', readySource);
// Platform now ready, execute any required native code
let opts: DocumentScannerOptions = {};
this.documentScanner.scanDoc(opts)
.then((res: string) => console.log(res))
.catch((error: any) => console.error(error));
});
}
The camera view is shown, I take the picture, the picture is shown for user validation. If I do accept the picture, this error is obtained:
Incorrect result or user canceled the action.
I cannot understand why this error is thrown. Versions:
Ionic CLI: 6.12.3
Ionic Framework: @ionic/angular 5.6.1
Cordova CLI: 10.0.0
Cordova Platforms: android 9.0.0
cordova-plugin-document-scanner 4.2.6 "Scan"
@ionic-native/document-scanner@5.31.1
Running on an android 11 device (OxygenOS 11.1.1)
Thank you for any help.