{ "id": "172730", "key": "TIMOB-26645", "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:19:03.000+0000", "created": "2018-12-12T00:17:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "activity", "android", "close", "exit" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-07T15:01:37.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\nCalling {{Activity.finish()}} on the root splash screen activity should automatically close all child windows/activities and exit out of the app.\r\n\r\nIt should only work this way for the root activity. Finishing/closing an activity in the middle of the stack should not automatically close the child activities.\r\n\r\n*Note:*\r\nThis is mostly needed for Titanium apps launched via the Java {{startActivityForResult()}} method. In this case, the Titanium developer must call the {{Activity.setResult()}} method on the root activity and exit out to respond to the other app with the result. You typically call {{Activity.finish()}} just after {{Activity.setResult()}} when following Google's examples.\r\n\r\n*Steps to reproduce:*\r\n# Build and run with the below code on Android.\r\n# Tap on the \"Close\" button.\r\n# Notice that the app does not exit out.\r\n\r\n{code:javascript}\r\nvar rootActivity = Ti.Android.currentActivity;\r\nvar window = Ti.UI.createWindow();\r\nvar button = Ti.UI.createButton({ title: \"Close Root Activity\" });\r\nbutton.addEventListener(\"click\", function() {\r\n\trootActivity.finish();\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Calling finish() on root splash screen activity should exit the app", "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": "444516", "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:48.000+0000", "updated": "2018-12-12T02:56:48.000+0000" }, { "id": "445002", "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:19:00.000+0000", "updated": "2019-01-04T21:19:00.000+0000" }, { "id": "445035", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket. Fix verified in SDK version 8.0.0.v20190107030906. \r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/10519", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-07T15:01:28.000+0000", "updated": "2019-01-07T15:01:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }