Originally published at: Introducing: Capacitor Barcode Scanner Plugin - Ionic Blog
We are thrilled to bring our first Ionic + OutSystems shared plugin to the Capacitor ecosystem as a core supported plugin.
Very useful, thank you! Is there a way to use it in a Cordova project?
I canât compile due to âInconsistent JVM-target compatibility detected for tasks âcompileDebugJavaWithJavacâ (17) and âcompileDebugKotlinâ (21)â. Raising the minimum SDK version doesnât seem to be enough.
When npx cap run android
, I encounter the following error
- What went wrong:
Execution failed for task â:app:checkDebugAarMetadataâ.
> Could not resolve all files for configuration â:app:debugRuntimeClasspathâ.
> Could not find any matches for com.github.outsystems:osbarcode-android:[1.0.1, 2.0.0[ as no versions of com.github.outsystems:osbarcode-android are available.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/outsystems/osbarcode-android/maven-metadata.xml
- https://repo.maven.apache.org/maven2/com/github/outsystems/osbarcode-android/maven-metadata.xml
The plugin requires to add some lines to the gradle files, see Barcode Scanner Capacitor Plugin API | Capacitor Documentation
Is there a way to customize the UI? The current barcode scanner plugin we use allows us to add a custom overlay, but the docs donât detail if this is possible.
Cool! If you provide a viewport option for overlaying this on top of html, Iâm all in. This full-screen stuff doesnât work for me.