Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17748] iOS8: Camera overlay rotates on app locked in portrait orientation mode

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2017-05-02T20:24:42.000+0000
Affected Version/sRelease 3.3.0, Release 3.4.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupport
ReporterMukund Samant
AssigneeEric Merriman
Created2014-09-12T17:02:48.000+0000
Updated2017-05-02T20:24:42.000+0000

Description

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

Comments

  1. Shannon Hicks 2014-09-12

    Probably related to (or fixed by) TIMOB-17662
  2. Lee Morris 2017-05-02

    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.

JSON Source