{ "id": "175070", "key": "ALOY-1732", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "21028", "description": "", "name": "CLI Release 8.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-08-12T14:28:28.000+0000", "created": "2020-06-03T02:55:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "alloy", "android", "background", "ios" ], "versions": [], "issuelinks": [ { "id": "58395", "type": { "id": "10620", "name": "Gantt End to End", "inward": "has to be finished together with", "outward": "has to be finished together with" }, "inwardIssue": { "id": "175011", "key": "TIMOB-27896", "fields": { "summary": "TiAPI: Add ability to run in the background without UI", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-08-12T14:28:28.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": [], "description": "*Summary:*\r\nWe plan on adding a new \"tiapp.xml\" property \"run-in-background\", when set {{true}}, will allow the \"app.js\" to be executed while the app is in the background and is unable to host UI. This means we have to defer root window creation until the app is ready to host UI. On Android, we also need to support recreation of the root window when user backs out of the app and re-launches it.\r\n\r\nSee Titanium SDK ticket [TIMOB-27896] for details.\r\n\r\n*To-Do:*\r\nThe \"app.js\" generated by Alloy needs to be changed to the following...\r\n{code:javascript}\r\n// Open root window if a new UI session has started. Can happen more than once in app's lifetime.\r\n// Event can only be fired if \"tiapp.xml\" property \"run-in-background\" is set true.\r\nTi.UI.addEventListener('sessionbegin', function () {\r\n\tAlloy.createController('index');\r\n});\r\n\r\n// Open the root window immediately if an active UI session exists.\r\n// Note: The Ti.UI.hasSession property was added as of Titanium 9.1.0.\r\nif ((typeof Ti.UI.hasSession === 'undefined') || Ti.UI.hasSession) {\r\n\tAlloy.createController('index');\r\n}\r\n{code}\r\n\r\n*Note:*\r\nWe need to release this Alloy change via CLI 8.1.0 before we release Titanium 9.1.0. The new Titanium backgrounding feature won't work correctly on Alloy without it. The plan is to have the Titanium 9.1.0 build system check that CLI 8.1.0 is installed when the backgrounding feature is enabled in the \"tiapp.xml\" or else we'll trigger a build failure.\r\n", "attachment": [], "flagged": false, "summary": "Add ability to run in the background without UI", "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": 1196, "state": "closed", "name": "2020 Sprint 11", "startDate": "2020-05-26T15:56:00.000Z", "endDate": "2020-06-05T15:56:00.000Z", "completeDate": "2020-06-08T21:05:50.356Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455620", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/alloy/pull/959", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-03T03:07:15.000+0000", "updated": "2020-06-03T03:07:15.000+0000" }, { "id": "456165", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Test steps:\r\n\r\nThis isn't really testable until TIMOB-27896 is merged, but for now just testing that apps launch fine with this change will do", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-07-20T11:48:06.000+0000", "updated": "2020-07-20T11:48:06.000+0000" }, { "id": "456438", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in CLI version 8.1.0-master.10, app launches just fine. \r\n\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-12T14:28:06.000+0000", "updated": "2020-08-12T14:28:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }