{ "id": "172582", "key": "TIMOB-26535", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-11-19T22:33:23.000+0000", "created": "2018-11-08T22:16:24.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-11-26T16:57:59.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": "- {{ti.foreground}} and {{ti.background}} events are being sent on every Activity {{onPause}} and {{onResume}}. This means every new window is classed as a new session, which is incorrect.\r\n- The events need to be tied to the application lifecycle and not each activity lifecycle\r\n\r\n*TEST CASE*\r\n{code:js}\r\nconst win = Ti.UI.createWindow({ backgroundColor: 'blue' }),\r\n btn = Ti.UI.createButton({ title: 'OPEN' });\r\n\r\nbtn.addEventListener('click', () => {\r\n // this should not create a new session (not send ti.foreground)\r\n Ti.UI.createWindow({ backgroundColor: 'red' }).open();\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Fix analytics session events", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1093, "state": "closed", "name": "2018 Sprint 23", "startDate": "2018-11-04T23:35:52.006Z", "endDate": "2018-11-18T23:35:00.000Z", "completeDate": "2018-11-19T05:30:34.338Z", "originBoardId": 114 }, { "id": 1095, "state": "closed", "name": "2018 Sprint 24", "startDate": "2018-11-19T05:35:58.310Z", "endDate": "2018-12-03T05:35:00.000Z", "completeDate": "2018-12-03T16:28:57.549Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "443441", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/10449", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-08T22:19:05.000+0000", "updated": "2018-11-08T22:19:05.000+0000" }, { "id": "443887", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket* Verified fix in SDK version {{8.0.0.v20181121114345}}. {{ti.foreground}} and {{ti.background}} events are no longer being sent when opening and closing a new ticket. Tested using the test case above in the description.\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.1.201809051655\r\nNexus 6P 6.0 (Sim)\r\nAPPC CLI: 7.0.7\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14.1\r\nNode.js Version: 8.9.1\r\nXcode 10.1\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-26T16:57:49.000+0000", "updated": "2018-11-26T16:57:49.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }