crhasing application when take a photo in google photos
Bug Report
crhasing application when take a photo in google photos
Problem
When activating the camera and taking the photo, it automatically saves the photo within Google Photos and my application crashes it
What is expected to happen?
I should not save the photo since I have blocked the option through the code
What does actually happen?
save the photo in automatic and close my app
Information
I have seen that this error only occurs on Motorola devices such as G7 play or G8 power lite...
These phones are quite robust and it is not a problem of the life cycle of the equipment ... and it does not have its own roll of photos ... it has automatically configured that when taking a photograph it saves in Google photos.
When downloading a camera that is not the native of the phone, the application works correctly
Command or Code
function setOptions(srcType) { var options = { // Some common settings are 20, 50, and 100 quality: 50, destinationType: Camera.DestinationType.FILE_URI, // In this app, dynamically set the picture source, Camera or photo gallery sourceType: srcType, encodingType: Camera.EncodingType.JPEG, mediaType: Camera.MediaType.PICTURE, allowEdit: true, correctOrientation: true } return options; }
`function openCamera(selection) {
var srcType = Camera.PictureSourceType.CAMERA;
var options = setOptions(srcType);
var func = createNewFileEntry;
navigator.camera.getPicture(function cameraSuccess(imageUri) {
displayImage(imageUri);
// You may choose to copy the picture, save it somewhere, or upload.
func(imageUri);
}, function cameraError(error) {
console.debug("Unable to obtain picture: " + error, "app");
}, options);
}`
function displayImage(imgUri) { var elem = document.getElementById('imageFile'); elem.src = imgUri; }
Environment, Platform, Device
Android
Version information
Android 10, Cordova 9.0.0
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Can you try without the allowEdit: true option?
@see https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html#android-quirks
Yes, in fact I have tried putting all the available options ... I have also tried removing all the options ... It works well in all models except that phone, I am 100% sure that it is a plugin problem with the phone model since I have also changed different versions of android to the phone