You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "sw-tt-vipuljadvani (via GitHub)" <gi...@apache.org> on 2024/04/24 15:53:39 UTC
[I] Camera not working in IONIC V5. [cordova-plugin-camera]
sw-tt-vipuljadvani opened a new issue, #886:
URL: https://github.com/apache/cordova-plugin-camera/issues/886
I have created an Android app using the IONIC V5, Cordova, and Cordova-android 9 and we have used Cordova-plugin-camera plugins for the camera and then image upload functionality.
when I uploaded the build on the Google Play Store, it required setting up Android SDK 33 so we made changes accordingly in the config.xml file.
Now the build is uploaded in Google Console but our camera functionality is not working in that build, The normal APK camera works fine on Android devices.
Any help?
Regards.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Camera not working in IONIC V5. [cordova-plugin-camera]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #886:
URL: https://github.com/apache/cordova-plugin-camera/issues/886#issuecomment-2111433467
cordova-android@12 and cordova-plugin-camera@7 is required for SDK 33 support.
Just updating the target SDK to 33 will not work because API 33 introduces breaking changes surrounding on reading external media files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Camera not working in IONIC V5. [cordova-plugin-camera]
Posted by "smoshkko (via GitHub)" <gi...@apache.org>.
smoshkko commented on issue #886:
URL: https://github.com/apache/cordova-plugin-camera/issues/886#issuecomment-2094772139
You have to update your plugin to version 7.0.0. The Android 13(SDK 33) support was added here CH-844
See [Release Notes](https://github.com/apache/cordova-plugin-camera/blob/master/RELEASENOTES.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Camera not working in IONIC V5. [cordova-plugin-camera]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #886: Camera not working in IONIC V5.
URL: https://github.com/apache/cordova-plugin-camera/issues/886
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Camera not working in IONIC V5. [cordova-plugin-camera]
Posted by "Benjith (via GitHub)" <gi...@apache.org>.
Benjith commented on issue #886:
URL: https://github.com/apache/cordova-plugin-camera/issues/886#issuecomment-2304548601
I had almost same isssue. i fixed by changing package
import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
and in camera function i need to check permission first
const cameraPermission = await this.diagnostic.isCameraAuthorized();
if (!cameraPermission) {
await this.diagnostic.requestCameraAuthorization();
}
`async takePicture(record, attempt = 0) {
try{
const cameraPermission = await this.diagnostic.isCameraAuthorized();
if (!cameraPermission) {
await this.diagnostic.requestCameraAuthorization();
}
const options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.DATA_URL, // or FILE_URI for file path
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE
};
this.camera.getPicture(options).then(
(imageData) => {
// If DATA_URL, imageData is a base64 encoded string
// If FILE_URI, imageData is a file path
this.capturedImage = 'data:image/jpeg;base64,' + imageData;
},
(err) => {
console.log('Error capturing image', err);
}
);
}catch(err){
console.error('Error capturing image:', err);
this.showAlert('Error', 'Unable to take picture. Error code: ' + err);
}
}
`
`async showAlert(header: string, message: string) {
const alert = await this.alertCtrl.create({
header,
message,
buttons: ['OK']
});
await alert.present();
}`
checked in android 14(sdk 34)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org