{ "id": "91547", "key": "TIMOB-9045", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-05-01T22:01:04.000+0000", "created": "2012-05-08T04:25:55.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core", "qe-and082012" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T21:40:47.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Expected messages are not displayed on DDMS logs for BaseUI > Window Events.\r\n\r\nSteps to Reproduce:\r\n1:Try to trigger each event\r\n\r\nExpected result\r\n1:each event trigger should show the right event fired message on the screen and also on the console\r\n\r\nActual Result:\r\nRight event fires message is being shown on the screen but not on console. Please find the code below:\r\n\r\n{code}\r\n\r\nvar win = Titanium.UI.currentWindow;\r\n\r\nvar focusText = 'Focus not fired';\r\nif (Titanium.App.Properties.getString('window_focus_event')!=null)\r\n{\r\n\tfocusText = 'Focus fired ' + Titanium.App.Properties.getString('window_focus_event');\r\n}\r\n\r\nvar blurText = 'Blur not fired';\r\nif (Titanium.App.Properties.getString('window_blur_event')!=null)\r\n{\r\n\tblurText = 'Blur fired ' + Titanium.App.Properties.getString('window_blur_event');\r\n}\r\n\r\nvar openText = 'Open not fired';\r\nif (Titanium.App.Properties.getString('window_open_event'))\r\n{\r\n\topenText = 'Open fired ' + Titanium.App.Properties.getString('window_open_event');\r\n}\r\n\r\nvar closeText = 'Close not fired';\r\nif (Titanium.App.Properties.getString('window_close_event'))\r\n{\r\n\tcloseText = 'Close fired ' + Titanium.App.Properties.getString('window_close_event');\r\n}\r\n\r\n//\r\n// FOCUS LABEL\r\n//\r\nvar focusLabel = Titanium.UI.createLabel({\r\n\ttext:focusText,\r\n\tfont:{\r\n\t\tfontFamily:'Helvetica Neue',\r\n\t\tfontSize:13\r\n\t},\r\n\tleft:10,\r\n\ttop:10,\r\n\theight:'auto',\r\n\twidth:'auto'\r\n});\r\n\r\nwin.add(focusLabel);\r\n\r\n//\r\n// BLUR LABEL\r\n//\r\nvar blurLabel = Titanium.UI.createLabel({\r\n\ttext:blurText,\r\n\tfont:{\r\n\t\tfontFamily:'Helvetica Neue',\r\n\t\tfontSize:13\r\n\t},\r\n\tleft:10,\r\n\ttop:30,\r\n\theight:'auto',\r\n\twidth:'auto'\r\n});\r\n\r\nwin.add(blurLabel);\r\n\r\n//\r\n// OPEN LABEL\r\n//\r\nvar openLabel = Titanium.UI.createLabel({\r\n\ttext:openText,\r\n\tfont:{\r\n\t\tfontFamily:'Helvetica Neue',\r\n\t\tfontSize:13\r\n\t},\r\n\tleft:10,\r\n\ttop:50,\r\n\theight:'auto',\r\n\twidth:'auto'\r\n});\r\n\r\nwin.add(openLabel);\r\n\r\n//\r\n// CLOSE LABEL\r\n//\r\nvar closeLabel = Titanium.UI.createLabel({\r\n\ttext:closeText,\r\n\tfont:{\r\n\t\tfontFamily:'Helvetica Neue',\r\n\t\tfontSize:13\r\n\t},\r\n\tleft:10,\r\n\ttop:70,\r\n\theight:'auto',\r\n\twidth:'auto'\r\n});\r\n\r\nwin.add(closeLabel);\r\n\r\n\r\nvar l0 = Titanium.UI.createLabel({\r\n\ttext:'try to trigger each event',\r\n\tbottom:50,\r\n\twidth:300,\r\n\theight:'auto',\r\n\ttextAlign:'center'\r\n});\r\n\r\nwin.add(l0);\r\n\r\nvar l1 = Titanium.UI.createLabel({\r\n\ttext:'touchstart not fired',\r\n\ttop:90,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:14,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l1);\r\n\r\nvar l2 = Titanium.UI.createLabel({\r\n\ttext:'touchmove not fired',\r\n\ttop:110,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l2);\r\n\r\nvar l3 = Titanium.UI.createLabel({\r\n\ttext:'touchend not fired',\r\n\ttop:130,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l3);\r\n\r\nvar l4 = Titanium.UI.createLabel({\r\n\ttext:'touchcancel not fired',\r\n\ttop:270,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l4);\r\n\r\nvar l5 = Titanium.UI.createLabel({\r\n\ttext:'singletap not fired',\r\n\ttop:150,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l5);\r\n\r\nvar l6 = Titanium.UI.createLabel({\r\n\ttext:'doubletap not fired',\r\n\ttop:170,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l6);\r\n\r\nvar l7 = Titanium.UI.createLabel({\r\n\ttext:'twofingertap not fired',\r\n\ttop:190,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l7);\r\n\r\nvar l8 = Titanium.UI.createLabel({\r\n\ttext:'swipe not fired',\r\n\ttop:210,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l8);\r\n\r\nvar l9 = Titanium.UI.createLabel({\r\n\ttext:'click not fired',\r\n\ttop:230,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l9);\r\n\r\nvar l10 = Titanium.UI.createLabel({\r\n\ttext:'dblclick not fired',\r\n\ttop:250,\r\n\tleft:10,\r\n\twidth:300,\r\n\theight:'auto',\r\n\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\nwin.add(l10);\r\n\r\nif (Ti.Platform.osname === 'android') {\r\n\tvar l11 = Titanium.UI.createLabel({\r\n\t\ttext:'longpress not fired',\r\n\t\ttop:290,\r\n\t\tleft:10,\r\n\t\twidth:300,\r\n\t\theight:'auto',\r\n\t\tfont:{fontSize:13,fontFamily:'Helvetica Neue'}\r\n\t});\r\n\r\n\twin.add(l11);\r\n}\r\n\r\nfunction pad (x)\r\n{\r\n\tif (x < 10)\r\n\t{\r\n\t\treturn '0' + x;\r\n\t}\r\n\treturn x;\r\n}\r\nfunction formatTime()\r\n{\r\n\tvar date = new Date();\r\n\tvar h = date.getHours();\r\n\tvar m = date.getMinutes();\r\n\tvar s = date.getSeconds();\r\n\treturn pad(h) + ':' + pad(m) + ':' + pad(s);\r\n}\r\n\r\n//\r\n// EVENT LISTENERS\r\n//\r\nwin.addEventListener('open', function()\r\n{\r\n\tvar date = formatTime();\r\n\tTitanium.App.Properties.setString('window_open_event', date);\r\n\topenLabel.text = 'Open fired ' + date;\r\n});\r\nwin.addEventListener('close', function()\r\n{\r\n\tvar date = formatTime();\r\n\tTitanium.App.Properties.setString('window_close_event', date);\r\n\tcloseLabel.text = 'Close fired ' + date;\r\n});\r\nwin.addEventListener('focus', function()\r\n{\r\n\tvar date = formatTime();\r\n\tTitanium.App.Properties.setString('window_focus_event', date);\r\n\tfocusLabel.text = 'Focus fired ' + date;\r\n\tTi.API.info('FOCUS fired in window');\r\n});\r\nwin.addEventListener('blur', function()\r\n{\r\n\tvar date = formatTime();\r\n\tTitanium.App.Properties.setString('window_blur_event', date);\r\n\tblurLabel.text = 'Blur fired ' + date;\r\n\tTi.API.info('BLUR fired in window');\r\n});\r\n\r\nwin.addEventListener('touchstart', function(e)\r\n{\r\n\tl1.color = 'red';\r\n\tl1.text = 'touchstart fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl1.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('touchmove', function(e)\r\n{\r\n\tl2.color = 'red';\r\n\tl2.text = 'touchmove fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl2.color = '#333';\r\n\t},200);\r\n\r\n});\r\nwin.addEventListener('touchend', function(e)\r\n{\r\n\tl3.color = 'red';\r\n\tl3.text = 'touchend fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl3.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('touchcancel', function(e)\r\n{\r\n\tl4.color = 'red';\r\n\tl4.text = 'touchcancel fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl4.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('singletap', function(e)\r\n{\r\n\tl5.color = 'red';\r\n\tl5.text = 'singletap fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl5.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('doubletap', function(e)\r\n{\r\n\tl6.color = 'red';\r\n\tl6.text = 'doubletap fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl6.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('twofingertap', function(e)\r\n{\r\n\tl7.color = 'red';\r\n\tl7.text = 'twofingertap fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl7.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('swipe', function(e)\r\n{\r\n\tl8.color = 'red';\r\n\tl8.text = 'swipe fired x ' + e.x + ' y ' + e.y + ' direction ' + e.direction;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl8.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('click', function(e)\r\n{\r\n\tl9.color = 'red';\r\n\tl9.text = 'click fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl9.color = '#333';\r\n\t},200);\r\n});\r\nwin.addEventListener('dblclick', function(e)\r\n{\r\n\tl10.color = 'red';\r\n\tl10.text = 'dblclick fired x ' + e.x + ' y ' + e.y;\r\n\tsetTimeout(function()\r\n\t{\r\n\t\tl10.color = '#333';\r\n\t},200);\r\n});\r\nif (Ti.Platform.osname === 'android') {\r\n\twin.addEventListener('longpress', function(e)\r\n\t{\r\n\t\tl11.color = 'red';\r\n\t\tl11.text = 'longpress fired x ' + e.x + ' y ' + e.y;\r\n\t\tsetTimeout(function()\r\n\t\t{\r\n\t\t\tl11.color = '#333';\r\n\t\t},200);\r\n\t});\r\n}\r\n\r\n\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Kitchensink - Expected messages are not displayed on DDMS logs for Window Events.", "creator": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Titanium SDK-2.0.2.v20120505151714\r\nTested with Titanium Studio:2.0.2.201205041518\r\nPlatform & version: Android v 2.2\r\nDevice Details: LG-p970(Android v 2.2)\r\nHost Operating System: OSX 10.7.3", "comment": { "comments": [ { "id": "215495", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Occurs on:\r\nTitanium Studio, build: 2.1.2.201208192014\r\nSDK version: 2.1.2.v20120816171609\r\nDevices:\r\nMotorola Droid (2.2.3)\r\nAsus Nexus7 (4.1)", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-21T16:56:17.000+0000", "updated": "2012-08-21T16:56:17.000+0000" }, { "id": "418443", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as invalid as this version of Kitchen Sink is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-01T22:01:04.000+0000", "updated": "2017-05-01T22:01:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }