Description
When taking a photo, if the user zooms in before taking the photo then when taking the photo an error will be thrown,
"code":-1,"error":"Failed to capture photo","success":false
. There is another error thrown while capturing the photo but it displays too quick to be read and is not logged to the console.
function showCamera() {
Titanium.Media.showCamera({
success : function(event) {
// called when media returned from the camera
Ti.API.debug('Photo taken successfully');
},
cancel : function() {
// called when user cancels taking a picture
Ti.API.debug('Photo cancelled.');
},
error : function(error) {
Ti.API.debug('Photo errored.');
// called when there's an error
var a = Titanium.UI.createAlertDialog({
title : "Camera"
});
a.setMessage(JSON.stringify(error));
a.show();
},
saveToPhotoGallery : true
});
}
if (Ti.Media.hasCameraPermissions()) {
showCamera();
} else {
Ti.Media.requestCameraPermissions(function(e) {
if (e.success === true) {
showCamera();
} else {
alert("Access denied, error: " + e.error);
}
});
}
Steps to reproduce
Add the above code to an existing app.js
Build to Windows appc run -p windows -T wp-device
Zoom in with the camera
Take a photo
Actual result
"code":-1,"error":"Failed to capture photo","success":false
is thrown
Expected result
Photo should be taken
I was not able to reproduce this issue on my Windows 10 mobile device (Katana01 FTJ152E). [~eharris] Can you provide more info, such as spec or model name of your device?
[~kota] I'm using Lumia 550 running 10.0.14393.321 [specs here](http://www.gsmarena.com/microsoft_lumia_550-7612.php) seem to be pretty close to what I can find for the Katana01 device you have. Unfortunately this is the only device I have access to (my Lumia 930 died) so I can't check any others
I would resolve this as "Not Our Bug", because I noticed it happens when I zoom the built-in "Camera" app which Microsoft provides. !wp_ss_20161103_0001.png|thumbnail! Interestingly this does not happen when I use camera from Titanium app. Because Titanium just uses the same camera component that Camera app uses, I would resolve this as bug of the built-in Camera component.
Closing ticket as it is marked as "Not Our Bug"