{ "id": "145634", "key": "AC-1557", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-29T04:57:26.000+0000", "created": "2015-03-11T09:29:32.000+0000", "labels": [ "background", "backgroundservice", "geolocation", "gps", "ios", "ios8", "location", "services" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:38:01.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": "My problem is the following: When I try to track GPS location in the background it often forgets or removes the event listener and stops retrieving location updates.\r\n\r\nI’ve put an Interval in my background services file to try and keep my service alive, I’ve set a frequency check, when the location hasn’t been called for more than 30 seconds, it removes and then adds the location event listener again. All of this does not make the application stay alive.\r\n\r\nI’ve added the following settings in tiapp.xml, these are also shown in the capabilities tab in Xcode:\r\n\r\n{code:xml}\r\nUIBackgroundModes\r\n\r\n location\r\n remote-notification\r\n fetch\r\n\r\nUIRequiredDeviceCapabilities\r\n\r\n gps\r\n location-services\r\n magnetometer\r\n\r\n{code}\r\n\r\nThese are Geolocation settings I use:\r\n\r\nTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\nTitanium.Geolocation.activityType = Titanium.Geolocation.ACTIVITYTYPE_FITNESS;\r\nTitanium.Geolocation.distanceFilter \t= 7;\r\n\r\nAnd the code to register the background service:\r\n{code:title=Bar.java|borderStyle=solid}\r\nvar service = Ti.App.iOS.registerBackgroundService({\r\n\turl : 'backgroundservice_tracker.js'\r\n});\r\n{code}\r\n\r\n", "attachment": [ { "id": "54402", "filename": "backgroundservice_tracker.js", "author": { "name": "steffanb", "key": "steffanb", "displayName": "Steffan Bruin", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-11T09:29:32.000+0000", "size": 7186, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Geolocation background refresh stops", "creator": { "name": "steffanb", "key": "steffanb", "displayName": "Steffan Bruin", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "steffanb", "key": "steffanb", "displayName": "Steffan Bruin", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 3.5.1, Xcode 6.1.1, Titanium Studio, build: 3.4.1.201410281727", "comment": { "comments": [ { "id": "362404", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe tested the issue you reported. But we did not reproduce this issue with the latest environment.\r\nSo we recommend you upgrade studio and SDK to the latest build then let us know if you get the similar behavior again.\r\n\r\n*Testing Environment:*\r\nCommand-Line Interface, version 4.1.2,\r\nTi SDK: 4.1.0.GA, \r\niOS Device: iPod 5G(v8.4.1),\r\nAlloy: 1.7.6, \r\nStudio Version: 4.1.1\r\n\r\nThanks.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-07T06:01:30.000+0000", "updated": "2015-09-29T04:57:20.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }