You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
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
});
}
The text was updated successfully, but these errors were encountered: