[TIMOB-13001] Android: Camera overlay does not support portrait mode and default view is in Landscape only.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-05-16T23:25:12.000+0000 |
| Affected Version/s | Release 3.0.0, Release 3.0.2 |
| Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0 |
| Components | Android |
| Labels | qe-closed-3.1.1, supportTeam |
| Reporter | Rupesh Sharma |
| Assignee | Ping Wang |
| Created | 2013-03-08T13:23:35.000+0000 |
| Updated | 2014-06-19T12:44:05.000+0000 |
Test case:
For FR: 1. Run the above test case on different devices (phones and tablets). 2. Orientate the device in portrait / landscape mode and then click the button to open the camera. The camera preview and overlay should show in the correct orientation.var win = Ti.UI.createWindow({ backgroundColor : '#eee' }); var scanner = Titanium.UI.createView({ width:200, height:200, borderColor:'red', borderWidth:5, borderRadius:15, }); var button = Titanium.UI.createButton({ title:'take foto' }); var overlay = Titanium.UI.createView(); overlay.add(scanner); overlay.add(button); button.addEventListener('click',function() { scanner.borderColor = 'blue'; Ti.Media.takePicture(); setTimeout(function() { scanner.borderColor = 'red'; },500); }); var showCameraButton = Ti.UI.createButton({ title : 'Open Camera', width : 200, height : 70, bottom : 5 }); showCameraButton.addEventListener('click', function() { Ti.Media.showCamera({ success : function(e) {}, overlay: overlay, mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO] }); }); win.add(showCameraButton); win.open();PR: https://github.com/appcelerator/titanium_mobile/pull/4135
3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4200
works fine on Samsung Galaxy Note, Android version: 2.3.6 but on S3, Android version: 4.1.1 portrait mode is selected by default and orientation doesn't change to landscape mode. Tested on: Device: Samsung Galaxy Note, Android version: 2.3.6 Device: Samsung S3, Android version: 4.1.1 SDK: 3.1.1.v20130503173050 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201305020752 XCode : 4.5.1
Verified functioning as expected with: Mac OS 10.8.3 Safari: 6.0.4 Xcode 4.6.2 CLI: 3.1.1-alpha Alloy: 1.1.3-alpha Appcelerator Studio, build: 3.1.1.201305271814 Titanium SDK version 3.1.1.v20130524180421 On: Nexus 4 4.2.1 Nexus 10 4.2 Galaxy S II 2.3.6