Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application crash when take picture from camera and accept this image #806

Open
3 tasks done
marina31714 opened this issue Sep 15, 2022 · 4 comments
Open
3 tasks done

Comments

@marina31714
Copy link

marina31714 commented Sep 15, 2022

Bug Report

Problem

When I take a picture with the tablet and accept, the application crashes.

What is expected to happen?

The image is successfully added and the alert is displayed.

What does actually happen?

The application is crashed.

Information

When select image from gallery it working fine
When change option to allowEdit to true, no crashes but showed this alert: You can't edit this image.

Command or Code

function setOptions(srcType) { var options = { // Some common settings are 20, 50, and 100 quality: 75, 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: false, correctOrientation: true } return options; }

                    var srcType = Camera.PictureSourceType.CAMERA;
                    var options = setOptions(srcType);

                    navigator.camera.getPicture(function cameraSuccess(imageUri) {

                        alert("get picture");

                    }, function cameraError(error) {
                        console.debug("Unable to obtain picture: " + error, "app");

                    }, options);

Environment, Platform, Device

Lenovo tab m10 hd
Android: 11

Version information

Cordova 11.0.0
Cordova platform: Android 10.1.2
Cordova plugins:
image

Android studio: 2021.1
Android sdk-tools:
image
Java Jdk:
image
Gradle:
image

Operating System: Windows 10 Home

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@FZampetti
Copy link

FZampetti commented Sep 23, 2022

I have the same issue and tablet, have you solved it?

@marina31714
Copy link
Author

Hi @FZampetti,
I change the plugin. Now I use https://github.com/apache/cordova-plugin-media-capture.
I hope this helps to you.

@mac89
Copy link

mac89 commented Oct 7, 2022

Presumably the same issue as #679

@Trilvid
Copy link

Trilvid commented Oct 1, 2024

have something similar, any recommended solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants