{ "id": "172711", "key": "AC-6051", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-12-17T21:52:23.000+0000", "created": "2018-12-06T19:08:17.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-12T18:32:55.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": "Here are the steps to reproduce:\r\n\r\n1) Create an app that launches a foreground service with some service running on an interval.\r\n2) Open the app the first time, you should see the foreground service in the notification panel.\r\n3) Swipe the app closed.\r\n4) Reopen the app. \r\n\r\nAt this point, the app will be stuck at the splash screen.\r\n\r\nYou will only see the following in console:\r\n\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] TiApplication: (main) [705,705] Analytics have been disabled\r\n[INFO] [Appname] [Appversion] (Powered by Titanium 7.5.0.2e5a7423d0)\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.pilrhealth.ema.EmaActivity@100128d\r\n\r\nNotably you will not see,\r\n\r\n[INFO] TiApplication: (main) [5,533] Titanium Javascript runtime: v8\r\n\r\nThis same use case works fine in 7.4.1.GA.\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "App will not load on Android after creating a foreground service, swiping app closed, and then attempting to reopen app", "creator": { "name": "jonkravetz", "key": "jonkravetz", "displayName": "jon kravetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jonkravetz", "key": "jonkravetz", "displayName": "jon kravetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android Emulator Google Pixel 2 (OS version 8.1) / Physical Device Moto X (OS version 8.1)\r\n7.5.0.GA (Drop down for Affects versions doesn't work for me)", "comment": { "comments": [ { "id": "444315", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please provide a standalone sample project that demonstrates the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-12-06T23:22:07.000+0000", "updated": "2018-12-06T23:22:07.000+0000" }, { "id": "444319", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a known design issue that will be addressed in Titanium 8.0.0.\r\nPlease see: [TIMOB-26538]\r\n\r\nThe above mentioned ticket also provides 3 work-arounds that you can use. If you want the foreground service to work after backing out of the app, then I highly recommend that you use the \"exitOnClose\" solution. You'll need to use that solution in Titanium 8.0.0 as well because the above mentioned ticket will automatically terminate the service upon app exit.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-07T00:46:35.000+0000", "updated": "2018-12-07T00:46:35.000+0000" }, { "id": "446780", "author": { "name": "jonkravetz", "key": "jonkravetz", "displayName": "jon kravetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "(I also made this comment on TIMOB-26538 for visibility)\r\n\r\nThese changes have wrecked our app. From what I understand foreground notifications were created for Android so background services can still run when the app is EXITED. The caveat is that a foreground notification persists in the notification panel so the user knows the app is still using memory.\r\n\r\nIn 7.4.1.GA i can start several background services on android (location tracking, accelerometer, notification scheduling, etc) and when i close the app since I created a foreground notification, the services still run perfectly.\r\n\r\nWith the changes in 7.5/8.0 when i EXIT the app the foreground notification persists, but then crashes because the underlying services are stopped automatically when the app is closed. We also do things with our app on rebooting the device, etc....\r\n\r\nThe workarounds above are only for asking the back button to background the app rather than close it. This does not help. Do we need to create a new ticket?\r\n\r\nWhat do we do?", "updateAuthor": { "name": "jonkravetz", "key": "jonkravetz", "displayName": "jon kravetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-12T18:32:55.000+0000", "updated": "2019-03-12T18:32:55.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }