{ "id": "87396", "key": "TIMOB-7892", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-02-28T09:34:12.000+0000", "created": "2012-03-06T00:16:47.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "18163", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "93353", "key": "AC-2780", "fields": { "summary": "orientationchange bug on android event fired only once", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-07T23:54:06.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Not sure if this is Emulator-specific or not. When running the code below in the emulator, the first time I rotate the device (Ctrl+F11), I see the label change to show the current orientation. However, subsequent rotations produce no update to the label. Also, the whole app seems to get stuck in the first orientation it switches into, such as landscape left.\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff', \r\n orientationModes: [ ],\r\n modal: true,\r\n navBarHidden: true,\r\n exitOnClose: true\r\n\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n\t});\r\n\r\nwin1.add(label1);\r\nwin1.open();\r\nTi.Gesture.addEventListener('orientationchange', function(e) {\r\n\tlabel1.text = \"Orientation is: \" + getOrientation(Ti.Gesture.orientation) + \r\n\t\t\"\\nWindow.orientation is: \" + getOrientation(win1.orientation);\r\n\tTi.API.info(\"Got orientation change event.\");\r\n});\r\n\r\n\r\nfunction getOrientation(o) {\r\n switch (o) {\r\n case Titanium.UI.PORTRAIT:\r\n return 'portrait';\r\n case Titanium.UI.UPSIDE_PORTRAIT:\r\n return 'upside portrait';\r\n case Titanium.UI.LANDSCAPE_LEFT:\r\n return 'landscape left';\r\n case Titanium.UI.LANDSCAPE_RIGHT:\r\n return 'landscape right';\r\n case Titanium.UI.FACE_UP:\r\n return 'face up';\r\n case Titanium.UI.FACE_DOWN:\r\n return 'face down';\r\n case Titanium.UI.UNKNOWN:\r\n return 'unknown';\r\n default:\r\n return 'constant not recognized';\r\n }\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Ti.Gesture.orientationchange event only fires once", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS X, Android Emulator", "comment": { "comments": [ { "id": "201041", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "The code works well on a real device, while it is buggy using the Android Emulator. Tested with SDK 2.0.1 and above.", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-02T06:18:41.000+0000", "updated": "2012-07-02T06:18:41.000+0000" }, { "id": "240131", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\nEmulator: Android version: 2.2", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-28T09:34:12.000+0000", "updated": "2013-02-28T09:34:12.000+0000" }, { "id": "409677", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T23:54:06.000+0000", "updated": "2017-03-07T23:54:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }