@kmott wrote:
Hello,
I am working on migrating my Cordova Ionic app to Capacitor, but I can’t seem to get the camera open for the user when accessing my Ionic web app on Android via Chrome.
When I am on Chrome on Windows or Linux, it opens the camera just fine, and I can take a picture.
When I am on Chrome on Android phone, I click the button to call my
selectImage()
, and nothing happens.Here’s my
selectImage()
code:async selectImage() { console.log('selectImage() Event Handler'); const cameraImage = await Plugins.Camera.getPhoto({ quality: 100, allowEditing: false, resultType: CameraResultType.Base64, source: CameraSource.Photos }); // Do something with cameraImage ... }
And here’s info about my Ionic project:
Ionic: Ionic CLI : 5.4.16 (/home/kmott/.files/bin/node-v10.15.3-linux-x64/node_modules/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.11.10 @angular-devkit/build-angular : 0.13.8 @angular-devkit/schematics : 7.3.8 @angular/cli : 7.3.8 @ionic/angular-toolkit : 1.5.1 Capacitor: Capacitor CLI : 2.0.1 @capacitor/core : 2.0.1 Cordova: Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : browser 6.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 6 other plugins) Utility: cordova-res : not installed native-run : 1.0.0 System: NodeJS : v10.15.3 (/home/kmott/.files/bin/node-v10.15.3-linux-x64/bin/node) npm : 6.4.1 OS : Linux 4.19
I think I still have some of the Cordova plugins installed, are those causing conflicts maybe, when running in Chrome browser on Android?
–Kyle
Posts: 1
Participants: 1