{ "id": "154234", "key": "AC-3337", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-03-10T18:37:18.000+0000", "created": "2016-01-12T11:45:39.000+0000", "labels": [ "backgroundservice", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-11-05T19:46:12.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": " I am developing an app in IOS, which have a background service to send the current position of the user to server using web API. the issue i am facing is when the app is minimised(paused), the background service will stop after 3 minutes.\r\n\r\nThe code for this is given in the following link. Please download the files. I have contacted the support team, they suggested to create a ticket here. \r\n\r\nhttps://www.dropbox.com/s/cjenlydiwpzsapk/backgroundService.zip?dl=0\r\n\r\nSame file has been attahced below. \r\n\r\nplease advise on this as HIGH priority as the app is not going to stores without this feature.\r\n\r\nThanks and Regards,\r\nJithesh", "attachment": [ { "id": "57934", "filename": "app.js", "author": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-12T11:44:03.000+0000", "size": 1472, "mimeType": "application/javascript" }, { "id": "57933", "filename": "test - Copy.js", "author": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-12T11:44:03.000+0000", "size": 176, "mimeType": "application/javascript" } ], "flagged": false, "summary": " Need to run the background services to get user current location on every 1 minute interval, which stops after 2-3 minutes of app being in background state.", "creator": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "\r\nOS:Mac OSX 10.9.5\r\nTitanium sdk:3.5.1,\r\nIos-8.1", "comment": { "comments": [ { "id": "374404", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Here are some Background Service Limitations which you should know. A background service is subject to limitations imposed by the operating system, such as\r\n\r\n1. The OS limits the total amount of time a background service can run for after the application is paused, typically to no more than 10 minutes.\r\n2. The OS may terminate the background service at any point to reclaim resources.\r\n\r\nSo, For your case, the device OS is stopping the backgroung service early to reclaim resources. Maybe because your device has low memory. We tried in our device and in simulator. For simulator we are able to run more than 8 minutes. And in device we were able to run 3 minutes. This is iOS device feature. Appcelerator can't do anything about it. Now here are some important link on the issue in the web.\r\n1. http://stackoverflow.com/questions/11417837/running-background-services-in-ios\r\n2. https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html\r\nHope this helps, Thanks.\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-01-13T11:23:04.000+0000", "updated": "2016-01-17T08:52:55.000+0000" }, { "id": "374565", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "What can we do to let some things happen in background?\r\n\r\nAn interval without a backgroundservice?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-14T12:31:26.000+0000", "updated": "2016-01-14T12:31:26.000+0000" }, { "id": "374570", "author": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any other way to send userlocation ,when the app runs in background continuosly ?? if any please help us out as soon as possible\r\n", "updateAuthor": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-14T13:30:53.000+0000", "updated": "2016-01-14T13:30:53.000+0000" }, { "id": "374571", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Have you tried an interval without the backgroundservice?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-14T13:49:53.000+0000", "updated": "2016-01-14T13:49:53.000+0000" }, { "id": "374770", "author": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yess,I tried using interval without background service too, no improvement\r\n", "updateAuthor": { "name": "jithesh55", "key": "jithesh55", "displayName": "jithesh shetty", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-18T04:41:33.000+0000", "updated": "2016-01-18T04:41:33.000+0000" }, { "id": "379203", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you follow this link http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-UIBackgroundModes\r\n\r\nWhich demonstrate some UIBackgroundModes for a BackgroundService to run for more than a limited period of time, the application must declare one or more of these background modes. For example in your app you will need to enable location background modes.\r\n{code}\r\n\r\n\r\n\r\nUIBackgroundModes\r\n\r\nlocation\r\n\r\n\r\n\r\n\r\n{code}\r\n\r\nPlease try it and let us know the response. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-08T16:00:08.000+0000", "updated": "2016-03-08T16:00:08.000+0000" }, { "id": "400452", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi,\r\nI need a solution for an enterprise app (no revision)\r\n\r\nI have put a infinite loop of sound playing, but the service will killed after a couple of minutes. On simulator it runs a couple of hours. But on device only very short. How ca I achieve an invinity runtime. The client want to sync DB after getting online connection.\r\nThanx", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-05T19:46:12.000+0000", "updated": "2016-11-05T19:46:12.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }