[AC-3337] 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.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-03-10T18:37:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | backgroundservice, ios |
Reporter | jithesh shetty |
Assignee | Ingo Muschenetz |
Created | 2016-01-12T11:45:39.000+0000 |
Updated | 2016-11-05T19:46:12.000+0000 |
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.
The 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.
https://www.dropbox.com/s/cjenlydiwpzsapk/backgroundService.zip?dl=0
Same file has been attahced below.
please advise on this as HIGH priority as the app is not going to stores without this feature.
Thanks and Regards,
Jithesh
Attachments
File | Date | Size |
---|---|---|
app.js | 2016-01-12T11:44:03.000+0000 | 1472 |
test - Copy.js | 2016-01-12T11:44:03.000+0000 | 176 |
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 1. 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. 2. The OS may terminate the background service at any point to reclaim resources. So, 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. 1. http://stackoverflow.com/questions/11417837/running-background-services-in-ios 2. https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html Hope this helps, Thanks.
What can we do to let some things happen in background? An interval without a backgroundservice?
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
Have you tried an interval without the backgroundservice?
Yess,I tried using interval without background service too, no improvement
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 Which 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.
Please try it and let us know the response. Thanks.
Hi, I need a solution for an enterprise app (no revision) I 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. Thanx