Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13001] Android: Camera overlay does not support portrait mode and default view is in Landscape only.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-05-16T23:25:12.000+0000
Affected Version/sRelease 3.0.0, Release 3.0.2
Fix Version/s2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0
ComponentsAndroid
Labelsqe-closed-3.1.1, supportTeam
ReporterRupesh Sharma
AssigneePing Wang
Created2013-03-08T13:23:35.000+0000
Updated2014-06-19T12:44:05.000+0000

Description

Comments

  1. Ping Wang 2013-04-09

    Test case:
       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();
       
    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.
  2. Ping Wang 2013-04-09

    PR: https://github.com/appcelerator/titanium_mobile/pull/4135
  3. Allen Yeung 2013-04-24

    3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4200
  4. Paras Mishra 2013-05-06

    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
  5. Ping Wang 2013-05-06

  6. Eric Merriman 2013-05-28

    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

JSON Source