{ "id": "172718", "key": "TIMOB-26638", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "2019-01-04T21:18:40.000+0000", "created": "2018-12-08T05:53:09.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "breaking-change", "intent", "intent-filter", "singletask" ], "versions": [], "issuelinks": [ { "id": "57057", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171712", "key": "TIMOB-26075", "fields": { "summary": "Android: Refactor app resume and \"newintent\" handling", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-08T10:35:25.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": "*Summary:*\r\nCurrently, the root {{Ti.Android.Activity}} object's \"intent\" property never changes when a \"newintent\" event gets fired. The activity's \"intent\" property returns the intent that originally launched/created the activity.\r\n\r\nWe can improve the usability of the app's \"newintent\" and intent-filter handling if the root activity's \"intent\" property was updated to the same intent provided by the \"newintent\" event.\r\n\r\nNote that {{Ti.App.Android}} provides a [launchIntent|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.App.Android-property-launchIntent] property which already provides the intent used to launch/create the root activity. So, we're not losing anything by making this change.\r\n\r\nAlso, it's currently possible to miss the \"newintent\" event on app startup, before the \"app.js\" has a chance to set up a listener for it.\r\n\r\n{code:javascript}\r\nvar rootActivity = Ti.Android.currentActivity;\r\nrootActivity.addEventListener(\"newintent\", function(e) {\r\n\t// Ideally, the 2 intents logged below should be the same.\r\n\tTi.API.info(\"### event.intent: \" + JSON.stringify(e.intent));\r\n\tTi.API.info(\"### rootActivity.intent: \" + JSON.stringify(rootActivity.intent));\r\n\r\n\t// The launch intent property must never change.\r\n\tTi.API.info(\"### launchIntent: \" + JSON.stringify(Ti.App.Android.launchIntent));\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Root Ti.Android.Activity \"intent\" property should be updated when \"newintent\" event is fired", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1106, "state": "closed", "name": "2019 Sprint 1", "startDate": "2018-12-31T19:39:58.070Z", "endDate": "2019-01-11T19:39:00.000Z", "completeDate": "2019-01-14T17:17:47.552Z", "originBoardId": 114 }, { "id": 1103, "state": "closed", "name": "2018 Sprint 25", "startDate": "2018-12-02T16:29:21.531Z", "endDate": "2018-12-16T16:29:00.000Z", "completeDate": "2018-12-15T02:33:24.870Z", "originBoardId": 114 }, { "id": 1104, "state": "closed", "name": "2018 Sprint 26", "startDate": "2018-12-17T15:56:00.172Z", "endDate": "2018-12-21T15:56:00.000Z", "completeDate": "2018-12-26T17:42:17.145Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444515", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10519", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T02:56:19.000+0000", "updated": "2018-12-12T02:56:19.000+0000" }, { "id": "445001", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-04T21:18:36.000+0000", "updated": "2019-01-04T21:18:36.000+0000" }, { "id": "445065", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*Closing ticket.*\r\n\r\nThe improvement is present in SDK:\r\n\r\n{noformat}\r\n8.0.0.v20190104153150\r\n{noformat}", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2019-01-08T10:35:16.000+0000", "updated": "2019-01-08T10:35:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }