Describe the Bug
When i try to choose some option to upload a photo i have this error: "Native: tried calling Camera.getPicture, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"
Only happend when i generate an APK with ionic pro, in my local with ionic cordova build/run android and with cap open android works.
My imports: import { Camera, CameraOptions, PictureSourceType } from '@ionic-native/camera/ngx';
Original issue by @aadriann on 2018-11-04T17:54:08Z
Bug Report
Ionic Info Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug When i try to choose some option to upload a photo i have this error: "Native: tried calling Camera.getPicture, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"
Only happend when i generate an APK with ionic pro, in my local with ionic cordova build/run android and with cap open android works.
My imports: import { Camera, CameraOptions, PictureSourceType } from '@ionic-native/camera/ngx';
Code: this.takePicture(this.camera.PictureSourceType.PHOTOLIBRARY);
takePicture(sourceType: PictureSourceType) { const options: CameraOptions = { quality: 100, sourceType: sourceType, saveToPhotoAlbum: false, correctOrientation: true, allowEdit: true };
Previously to this error, this functionality works, but i update to ionic 4.3.0 and fails