-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background Ranging stops after 3 minutes #45
Comments
Hi @wallanoo! I will be able to assist you with my solution re a background service and determinedRegionState events, but am unable to detail it all immediately. It took me days of trial and error to find a solution, so I would like to save you the hassle. Will respond to this thread as soon as I am able. Working on some other PHP projects at the mo. |
thanks a lot @RBAtkins0n the determinedRegionState now is clear. |
Hi, any new about it? I've googled, and it seems that in iOS9: Setting allowsBackgroundLocationUpdates = YES on CLLocationManager seems to solve the background ranging problem. here the topic: http://stackoverflow.com/questions/32478169/ibeacon-ranging-in-background thanks |
Hi, I'm running a test with this module. I'm integrating this app with an app which is already available for GPS (background location enabled in PLIST) I found out that in my app the background notifications for ibeacon keep running / notifying (ranging events) to the app (i see it in my log) also after the 3 minutes. kind regards, roeland
|
It could be a good try.. what do you have exactly in your tiapp.xml concerning location tags for info.plist? |
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>location</string>
<string>remote-notification</string>
</array>
<key>NSLocationAlwaysUsageDescription</key>
<string>
DESCRIPTION HERRRRRE
</string> But of course the |
thanks a lot @RBAtkins0n However, it is a workaround for an existing module issue, so it could be useful to fix it (I'm not able to fix module's code on github, but maybe setting allowsBackgroundLocationUpdates = YES on CLLocationManager or something else could fix it, in order to avoid problems on iOS updates) Thanks for all anyway |
No problem @wallanoo (my name is roeland btw 😄 ). Great to hear that you got it running. I think ultimately you should have something like:
This is what I would pursue in your case I guess... However I have not implemented this technique so I can't help you with that |
ok Roeland, good suggestion |
When is trigged determinedRegionState event? It never appears on my test app.. |
Actually it never appears in my app too, it was just for test.. |
Ok. I need a function similar to yours, I have to monitor the enter/exit in a region, even in the background. I tried your files.zip and added localization in tiapp.xml, and it seems to work. You have further optimized the code? |
not for now.. maybe in the future |
But if I enabled background location in PLIST (NSLocationAlwaysUsageDescription), I can avoid using a background service (Ti.App.iOS.registerBackgroundService) then? Or is it better to use the background service also? |
It still works also without registering a background service in my app |
Hi @RBAtkins0n , @williamrijksen
I've started this discussion in issue #37
I've coded an app that have to perform region monitoring and continuous ranging in background, as defined in
(https://community.estimote.com/hc/en-us/articles/203914068-Is-it-possible-to-use-beacon-ranging-in-the-background-)
I be careful to strictly follow the instructions (added permissions and background mode in tiapp.xml, tried a background service etc.), thanks to @RBAtkins0n and @williamrijksen
so my app is able to notify if a beacon is entering/exiting the region, even if it happens after many minutes.
Unfortunately, ranging ALWAYS stops after 2-3 minutes, no way.
I'm working with 0.11.0 module, Titanium SDK 5.1.2, Xcode 6.2
Maybe I miss something obvious, my code is quite simple and it seems all ok...
I attach the code here, I actually do not know how to fix it...
files.zip
thanks for all in advance
The text was updated successfully, but these errors were encountered: