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

getPicture did not work on my Samsung Tab A7 Lite #807

Closed
gpspremsun opened this issue Sep 16, 2022 · 1 comment
Closed

getPicture did not work on my Samsung Tab A7 Lite #807

gpspremsun opened this issue Sep 16, 2022 · 1 comment

Comments

@gpspremsun
Copy link

gpspremsun commented Sep 16, 2022

I just found that getPicture did not work on my Samsung Tab A7 Lite (One UI 4.1 with Android 12) but all other devices I have (both android/ios on variety os version include One UI 4.1 with Android 12 on other devices)

Normally I got base64 string were returned to my application after I take a photo but for my new tested Samsung Tab A7 Lite device I got an error like "No Image Selected" immediately after camera was opened

I notice that after getPicture was called normally my application would open camera function under itself but on my new tested Samsung Tab A7 Lite seem it call Samsung stock Camera app separately instead.

currently I user cordova-plugin-camera 4.1.0 under Cordova 9.0 for my Android development and below is code I have in my application...

function onCamSuccessBase64(imageData) {
var i = new Image();
i.onload = function () {
intFileBase64Width = parseInt(i.width);
intFileBase64Height = parseInt(i.height);
strFileBase64 = imageData;
showConfirm();
};
i.src = "data:image/jpeg;base64," + imageData;
}

function onCamFail(message) {
alert("Failed because: " + message);
}

function photo_take() {
navigator.camera.getPicture(onCamSuccessBase64, onCamFail, {
quality: 30, targetWidth: 864, targetHeight: 1536,
allowEdit: false, correctOrientation: true, destinationType: Camera.DestinationType.DATA_URL
});
}

@breautek
Copy link
Contributor

Stale

@breautek breautek closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
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

2 participants