xseignard / cordovarduino

Cordova/Phonegap plugin for USB host serial communication from an Android device.
MIT License
166 stars 112 forks source link

Ionic capacitor android - Cordova_not_available #128

Open dario-pedro opened 3 years ago

dario-pedro commented 3 years ago

Describe the bug I'm trying to run your Serial lib on a ionic with capacitor. However, when executing the code, I'm obtaining the error cordova_not_available

To Reproduce Please share the following:

  1. Version of cordovarduino / cordova

"cordovarduino": "0.0.10", cordova - (not using, but for testing, tried to install it via npm install, but the error persisted. Keep in mind that this is not a cordova project, but a capacitor project)

  1. Type of board you use and code

Real Device : Herelink RC. Emulator: Pixel3 API 25

Expected behavior

Find an external device. When no USB is connected, 'USB not found' or something similar was expected.

Screenshots image

Additional context

Note 1: On API 29 (Android 10) is working, but our real device (HereLink) just runs Android 7.1.2.

ionic info

Ionic:

Ionic CLI : 6.16.1 (/home/grolo/.nvm/versions/node/v14.16.1/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.6.7 @angular-devkit/build-angular : 0.1102.13 @angular-devkit/schematics : 11.2.13 @angular/cli : 11.2.13 @ionic/angular-toolkit : 3.1.1

Capacitor:

Capacitor CLI : 3.0.0 @capacitor/android : 3.0.2 @capacitor/core : 3.0.0 @capacitor/ios : 3.0.0

Utility:

cordova-res : not installed globally native-run (update available: 1.4.0) : 1.3.0

System:

NodeJS : v14.16.1 (/home/grolo/.nvm/versions/node/v14.16.1/bin/node) npm : 6.14.12 OS : Linux 5.4