This is not a regression. Seen in 3.4.1 SDK too.
Description:
1. Replace the app.js the following code:
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var openCameraButton = Ti.UI.createButton({
title: 'Open Camera With Overlay',
top:'30%'
});
openCameraButton.addEventListener('click', function(e) {
var cameraOverlay = Ti.UI.createView();
var takePhotoButton = Ti.UI.createButton({
bottom: 65,
title: 'Take Photo',
});
var closeCameraButton = Ti.UI.createButton({
bottom: 65,
height:40,
right: 10,
title: 'Close Camera',
top: 10,
});
takePhotoButton.addEventListener('click', function(e) {
Ti.Media.takePicture();
});
closeCameraButton.addEventListener('click', function(e) {
alert('closing camera');
Ti.Media.hideCamera();
});
cameraOverlay.add(takePhotoButton);
cameraOverlay.add(closeCameraButton);
showcamera(cameraOverlay);
});
var opencamera1 = Ti.UI.createButton({
title: 'Open Camera With No Overlay',
top:'60%'
});
opencamera1.addEventListener('click',function(e){
showcamera();
});
var showcamera = function(overlayname){
Ti.Media.showCamera({
success: function(e) {
alert('success callback');
},
cancel: function() {
Ti.API.info('cancel callback');
},
error: function(e) {
Ti.API.info('error callback');
},
allowEditing: false,
animated: false,
autohide: false,
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
overlay: overlayname,
saveToPhotoGallery: true,
showControls: false
});
};
win.add(openCameraButton);
win.add(opencamera1);
win.open();
2. Build & run the app on Nexus 9 running android 5.0.1 , a nexus 10 running 4.2 , a nexus 5 running android 5.0. & a Samsung Galaxy S4 running android 4.4.2.
3. Click on the button "Open Camera With Overlay".
4. Click on the button "Open camera With No Overlay".
Actual Result:
1. When the camera view opens with overlay notice the resolution is low. This is most prominent on Nexus 9 running 5.0.1, less prominent on Nexus 10 running android 4.2 , no issue seen on nexus 5 & Samsung galaxy S4 running android 5.0 & android 4.4.2 respectively.
2. When the default camera view with no overlay opens no issue is seen on any devices.
Please refer the attached screenshots for reference.
Note:
When a pic is taken with custom overlay the pics appear with proper resolution in the gallery.
Expected Result:
1. The camera view resolution while using overlay should be the same as when not using overlay.
No comments