{ "id": "174170", "key": "AC-6379", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2019-11-05T22:49:11.000+0000", "created": "2019-09-24T15:47:30.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-11-05T22:49:11.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Using the following code to test, when you compile with 7.5.2.GA the alert box is shown, when compiled with 8.0.x, the alert box is never shown.\r\n\r\n\r\n{code:java}\r\nvar tg = Ti.UI.createTabGroup();\r\n\r\nvar t = Ti.UI.createTab();\r\n\r\nvar w = Ti.UI.createWindow();\r\n\r\ntg.addEventListener('open', function() {\r\n\r\n tg.getActivity().onStart = function(e){\r\n         alert(\"ACTIVITY START\");\r\n     };\r\n});\r\n\r\nt.add(w);\r\ntg.add(t);\r\ntg.open();\r\n{code}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "TabGroup Activity not firing onStart callback", "creator": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "subtasks": [], "reporter": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "environment": "Appc SDK 8.x", "comment": { "comments": [ { "id": "451626", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As of 8.0.0, we've made breaking changes to activity callback handling to settle various issues developers were having with its old design.\r\n\r\nFor your info, how it worked before was that an activity's callback was not invoked immediately. It was instead queued to be invoked later (which allowed your code to work). The issue with that was the \"onDestroy\" callback would never get invoked for the last window during an app exit. The other issue is that some devs need immediate feedback when the app is going in/out of the foreground via the onStart/onStop callbacks because some native Android APIs will refuse to work while backgrounded.\r\n\r\nTo see the details, have a look here...\r\nhttps://github.com/appcelerator/titanium_mobile/pull/10733\r\n\r\nThat said, the real issue is that you are setting up your \"onStart\" callback too late. You need to set it up before opening the window as shown below. This will work on both the older and newer versions of Titanium.\r\n{code:javascript}\r\ntg.getActivity().onStart = function(e) {\r\n\talert(\"ACTIVITY START\");\r\n};\r\ntg.open();\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-25T18:36:57.000+0000", "updated": "2019-09-25T18:36:57.000+0000" }, { "id": "451681", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello!\r\n\r\nHope you are doing fine today.\r\n\r\nWould you please reply us regarding previous reviews? We are looking forward to your response.\r\n\r\nBest Regards,\r\nCustomer Support Team", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-09-29T09:28:26.000+0000", "updated": "2019-09-29T09:28:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }