Project: titanium
Issue TIMOB-17712: iOS8:  if the user rotates the device when exiting image capture the orientation of the device is in the opposite orientation it should be in
I have already consumed the change from TIMOB-17662 by setting autorotate to false in CameraDevice.js and this issue is still present. I initially mentioned this issue in Case 2640 which has been closed so that we can focus on this specific case. I have uploaded an app called 9-16-OppositeOrientationTest.zip and screenshots which illustrate this issue. CASE 1 (landscape window in portrait mode) # Launch the app in Landscape mode with the Home button on the right # Rotate the app around, notice the UI changes to reflect the orientation correctly. # Get it back into landscape mode (Home button on right). # Click Launch Camera # Click the (X) button and then immediately rotate the tablet to portrait up or portrait down. ## Notice that the image capture view will close and the app then rotates into landscape orientation. It should rotate to portrait orientation. See screenshot Home On Bottom.png CASE 2 (portrait window in landscape) # Kill the app # Launch the app in Landscape mode with the Home button on the right # Rotate the app around, notice the UI changes to reflect the orientation correctly. # Rotate the app to portrait mode (Home button on bottom). # Click Launch Camera # Click the (X) button and then immediately rotate the tablet to landscape left up or landscape right. ## Notice that the image capture view will close and the app then rotates into portrait orientation. It should rotate to landscape orientation. See screenshot Home On Right.png h5. Issue reproducible with the following code {code} var win = Ti.UI.createWindow({ backgroundColor: 'white' }); var button = Ti.UI.createButton({ title: 'Open', top: 50, left: 10, right: 10, height: 50 }); win.add(button); win.open(); button.addEventListener('click', function() { Ti.API.info('click'); Ti.Media.showCamera({ success: success, error: error, saveToPhotoGallery: false, allowEditing: false, mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO], showControls: true, autohide: false }); function success(e) { Ti.API.info('Success'); } function error(e) { Ti.API.info('Success'); } }); {code}
Story points: 5