-
Notifications
You must be signed in to change notification settings - Fork 276
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
App stops sending locations after a few days to a week #316
Comments
That's all the logs you have? Not much to analyze there. |
Those are the only logs from the days it was supposed to report but didn't. The actual logs are way to long to post here, so I just posted the last stopBackgroundTask from april 1st, and then the logs from the days it didn't report. |
Post the logs to a separate file and link it. |
When field-testing, you should use |
Here it is: [removed for privacy] The reason I set debug: false, was it seemed like |
Also I force quit the app on the first day of testing, and never reopened it. |
First thing's first, review all your event-listeners and make sure you're calling
Are you subscribing to the |
You denied "Motion Activity updates" permission?
|
No, I am not subscribing to any location event on purpose. I was trying to keep it as bare-bones simple as possible. |
I just checked, and yes, I have all motion activity banned on my phone. However, I had another tester who had the same issue, and I don't think he banned motion activity updates. Still, it should work even with said motion updates disabled, right? |
It will work without Motion Activity. iOS changes to tracking mode via stationary geofence exit. Your activity-recognition won't be as good and the plugin will consume more battery. This is interesting:
|
Before you headed out for your 4 mile trip, the plugin created its stationary geofence at this location. Is that where you started your 4 mile trip? |
That is the restaurant I was at |
So you're saying the plugin failed to detect you leaving that restaurant? |
I'm not sure. I didn't plot the points, I just looked at general timestamps |
Subscribe to the bgGeo.on('location', function(location, taskId) {
bgGeo.finish(taskId);
}); |
Darn, I think I actually went to the restaurant on saturday night not sunday. But yes, looking through the points, that is indeed the last point that was sent to the server. It didn't record me coming home, or my walk 1 mile out yesterday. I will add in that code. Any idea why it would work for a few days in the background even without that code? |
The plugin has a fail-safe to automatically |
So I'm confused now. What's the story now? |
Saturday 2017-04-01: Monday 2017-04-03: Today |
I think the plugin thinks you were still in that geofence at the restaurant. I'll have to try and simulate this kind of failure. |
Seems about right, but I don't know why it would be doing that. I have rebuilt with debugging enabled, added the location listener and |
iOS geofences are handled at the os level. It's up to the os and your
network environment to fire them.
--
Snet form Gmail Mobile
|
Do you think |
No
|
Have you disabled "Background Fetch" for your app? |
I don't think so, but how would I know? |
Settings -> Your App -> Background App Refresh |
Background App refresh, and all other settings there are enabled. location is set to Always |
I have new failure confirmation. |
looks like the app was configured to |
You'll get a much more pleasant debugging experience if you build the Ionic 2 version. It's the same plugin, just the UI is much much better. |
Ok, makes sense. I have asked the other tester to please look at the settings again. I think I just used the ionic 1 version because our app is written in ionic 1. As for my own testing I have very strange results. For some strange reason, the GPS started saying I was in Rio de Janeiro! It said this for about a day, so I first uninstalled the app we are working on - that didn't help. Then I rebooted and it works now. I'm not sure what happened, but will reinstall our app. |
Ah, you are right! I don't remember doing that, but I see that Rio de Janeiro is selected. You are very on top of things. Thank you! |
I've made some changes in the Premium Version that might help with your issue. You used to have access to the private repo, seems you didn't pay the yearly maintenance fee. You'll have to wait some time for the fix to appear here in the public version. |
All right, thank you for looking into it.
…On Thu, Apr 20, 2017 at 6:49 PM, Chris Scott ***@***.***> wrote:
I've made some changes in the Premium Version that might help with your
issue. You *used to* have access to the private repo, seems you didn't
pay the yearly maintenance fee. You'll have to wait some time for the fix
to appear here in the public version.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHakKDwNicez8ynnp7woHFRIMSBCxiVAks5rx-8MgaJpZM4MzaJJ>
.
|
Latest stable release has been publish ( |
Ok I will try it out. Thanks for letting me know. |
Update please. |
I have tried to install the latest release (I assume you meant to write 2.7.1 instead of 1.7.1). I get a build error: Plugins/cordova-background-geolocation-lt/CDVBackgroundGeolocation.m:35:33: Incompatible block pointer types assigning to 'void (^)(NSString *__strong, NSString *__strong, NSDictionary *__strong)' from 'void (^)(NSDictionary *__strong)' At this code:
which I'm guessing references this code
|
rebuild. |
Great, it installs now! I will test it over the next several days. I have been busy on other things and had not gotten around to updating this program. |
Can this be closed? |
Your Environment
cordova -v
): 6.5.0cordova platform ls
): ios 4.3.1Expected Behavior
Plugin should continue reporting locations indefinitely whenever user moves
Actual Behavior
Plugin reports location for several days, maybe a week, then stops reporting locations to server. In my last test, I installed and started the app on Monday. It reported motion fine through Saturday. From Sunday on, it has failed to report when I left the house. I did not open the app or otherwise touch it. On Sunday I went to a restaurant approximately 4 miles away, ate dinner, then left. All locations during this time went unreported.
I have noticed that it is still tracking my location, but it seems that it just isn't triggering a report. The reason this might be the case is that in the privacy part of iOS settings, it shows the purple icon after going on a walk where I was about a mile from my home at the farthest. I'm not sure why it would not be reporting my location change though.
Steps to Reproduce
This is the relevant code:
Context
Debug logs
Did not record my walk yesterday where I went 1 mile out and back (2017-04-03), or trip to place 4 miles away on Sunday (2017-04-02)
The text was updated successfully, but these errors were encountered: