Error: "BarcodeScanner.checkPermission()" is not implemented on android

Hello everyone ! I am using the @capacitor-community/barcode-scanner and when i test the scanner in android studio, i get this error :

E/Capacitor/Console: File: http://localhost/main.6ddbf702db8bc9b1.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): Error: “BarcodeScanner.checkPermission()” is not implemented on android
Error: “BarcodeScanner.checkPermission()” is not implemented on android
at http://localhost/7423.28d442c0482fb5bc.js:1:2292
at v.invoke (http://localhost/polyfills.fc6fad8ce607b49d.js:1:6542)
at Object.onInvoke (http://localhost/main.6ddbf702db8bc9b1.js:1:251927)
at v.invoke (http://localhost/polyfills.fc6fad8ce607b49d.js:1:6482)
at M.run (http://localhost/polyfills.fc6fad8ce607b49d.js:1:1938)
at http://localhost/polyfills.fc6fad8ce607b49d.js:1:16761
at v.invokeTask (http://localhost/polyfills.fc6fad8ce607b49d.js:1:7160)
at Object.onInvokeTask (http://localhost/main.6ddbf702db8bc9b1.js:1:251743)
at v.invokeTask (http://localhost/polyfills.fc6fad8ce607b49d.js:1:7081)
at M.runTask (http://localhost/polyfills.fc6fad8ce607b49d.js:1:2555)

Have your searched in the repos issues?

Yes i searched in the repo but no response

I had this same issue before and iirc, I seen several closed issues about this issue for android. I think you need to add some property inside of the method or you need to use another method the plugin provides. Don’t remember much.

Thank you so much , can you see in your code how did you reseolve this probleme please !

In that case, there can be an issue with your old scanner you are using. I also faced similar issue when I was using brother brand and then I shifted to Munbyn Android Scanner and the issue got resolved.