Problem Description
Camera overlay on iPad rotates in an app that is locked in portrait mode.
Expected: Camera overlay should stay in portrait mode
Steps to reproduce
1. Create a new mobile project (classic titanium)
2. Paste this to app.js
var win = Titanium.UI.createWindow({
backgroundColor : '#fff',
layout : 'vertical'
});
var frmcamera = Ti.UI.createButton({
backgroundColor : '#ff0000',
title : 'Open Camera',
color : '#fff',
width : Ti.UI.SIZE,
height : Ti.UI.SIZE,
top : 30
});
frmcamera.addEventListener('click', function() {
fireUpTheCamera();
});
win.add(frmcamera);
var overlay = Ti.UI.createView({
width : 50,
height : 50,
});
// Create an ImageView.
var overlayImg = Ti.UI.createImageView({
image : '/KS_nav_ui.png',
width : Ti.UI.SIZE,
height : Ti.UI.SIZE,
autorotate : true,
});
overlayImg.addEventListener('click', function() {
Ti.Media.takePicture();
});
overlay.add(overlayImg);
function fireUpTheCamera() {
Titanium.Media.showCamera({
success : function(event) {
},
cancel : function() {
},
error : function(error) {
},
saveToPhotoGallery : true,
allowEditing : false,
overlay : overlay,
mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]
});
}
win.open();
3. Set tiapp.xml
<iphone>
<orientations device="ipad">
<orientation>Ti.UI.PORTRAIT</orientation>
</orientations>
<orientations device="iphone">
<orientation>Ti.UI.PORTRAIT</orientation>
</orientations>
</iphone>
4. Test in a device
Probably related to (or fixed by) TIMOB-17662
Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.