-
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
Android stops backgroundtracking after a while #717
Comments
I'm experiencing something similar where I got no messages in my server even though everything was working the first day on Android 8. Though, and possibly related, after several days, and with me not doing anything to the phone (other than restarting it) or the code, i got a dump into the server, all at the same time, of several days worth of geofence events. |
@efhilton provide your Environment / Config information as above. Logs too |
I'm no longer convinced it's the exact thing though it may be related. There are SOME geofences that are not responding, hence my confusion. It works fine for say fences around my office, around town. But my personal home and local airport do not trigger. So when I did all my work, most of it was at my office. But days later when I took it home or to the airport, I get absolutely nothing. Otherwise, my office, favorite restaurants, etc. seem to continue to trigger perfectly. I've recently uninstalled the app, set reset to true, deleted all geofences, and added them again. Home and airport continue to not work, which I find extremely odd.
My configuration is as follows:
|
Post log |
Alright, I'll try to get something useful. However, there are no errors. I simply continue to get heartbeats while I'm at home. My server logs clearly show Enter, Dwell, Exit from my Office. Then nothing as I went home and to the airport. Then Enter, Dwell, Exit from grocery store, restaurant, skyzone, etc. But when I return home I get nothing. Just heartbeats. No errors. It's behaving exactly as if there is no geofence location, though it shows up in the list of fences. It's now been 4 days of this, repeatable. |
When I set de debug mode to "true" it keeps running. Is there something in that mode that keeps the background posting alive? I have logfiles but there is nothing to see. When I disable the debug mode it sleeps or kills after a while. The only thing I changed is the debug mode... How come? |
There’s no way debug: true has any effect upon behaviour. That is as superstitious as believing bad luck comes from walking beneath ladders. |
Last night it stopped again and didn't restart. Meanwhile i've updated the plugins and Android to geo 2.12.14 and Android 7.1.0. The last data I received:
|
Mine stopped working again yesterday morning. I have not touched the code in a few days. After I noticed that it's not working anymore, I plugged it into my computer to look at the logs. There are absolutely no useful bits of information that I can report. There are no errors, no warnings, no logs. It just silently fails. By the way, I'm now convinced that -- unlike one of my previous posts -- it is not a location issue, but definitely the module stops working after several days. |
I suggest you all install the SampleApp and run it in parallel to your own apps. The SampleApp will post results to my tracking server at |
I've done that, both applications stopped. The Sample App a few hours earlier than my own app. Do you see more data than I can see in the tracker logs? Use my username for the info. Thanks. -edit- here my logs from my app:
|
Still the same issues. Please help? |
I was on a road trip for most of July with 7 devices (4 Android, including 2 Samsung; 3 iOS). These devices were sitting untouched in a bag, the whole time. I had no issues. |
Ok. So you say that my customers and I make up these issues? |
No, that your issues are specific to a particular device / os / environment. So you tested this on the SampleApp? What username did you use so I can observe on my test server at http://tracker.transistorsoft.com? |
Yes, i've used my nickname. |
It's not a very long test, only a few hours worth. Many of your locations came from Cellular provider (ie: accuracy >= 1000). Few locations came from GPS. Go for a longer test. For comparison, you can view my tracking for July here. (you can select my different devices in [Devices][v] dropdown on left. |
Here's what happens when you go for a subway ride. Note the large jumps when I took a subway to the large park. |
That is the problem.... logs can't be longer than that because the app closes on the background. I assumed one log would do because it does the same over and over again with my own app. The only way it restarts the logging is after a reboot of the phone or manually opening it again. I can't see the background service in Android Assistant after a while and don't get posts on the server. |
Show me a raw Are you sure you don't have the Developer Option "Don't keep activities" enabled on your device? |
Yes i'm sure, the app is live and works on most devices. I still use the same configuration as posted previously. I will try to gather the logcat. |
What's the status on this? |
I'm still figuring out how to retreive these logs. |
have you read the Debugging wiki? |
Personally I'm still experiencing this but I've had to move on to resolve
bigger pressing items. I'll try to get back to this soon
…On Mon, Aug 20, 2018, 09:49 Chris Scott ***@***.***> wrote:
have you read the Debugging
<https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Debugging>
wiki?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#717 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYN6evN5OjpgYrI3lS4Zx_i64m0JeNXVks5uSsx0gaJpZM4Uzd-p>
.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open. |
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you. |
On the most IOS en Android phones the app continues tracking on the background. Now I get reactions of users that after a while (after closing the app) it stops tracking coordinates. When you open the app and close it again it will track for a while but keeps going to sleep (app still runs on the background but does nothing)
Your Environment
Plugin version: 2.10.1
Platform: iOS and Android
OS version: 4.5.4 / 6.3.0
Device manufacturer / model: Samsung
Cordova version: 8.0.0
Cordova platform version: 4.5.4 / 6.3.0
Plugin config
bgGeo.configure({
//HTTP
url: "https://api.domain.com/checklocation/",
autoSync: true,
httpTimeout: 3000,
locationTemplate: '{"lat":<%= latitude %>, "lng":<%= longitude %>}',
params: {
data: {uuid: device.uuid,
version: "1.9"}
},
method: 'POST',
}
Expected Behavior
The app has to keep running on the background at all times, sending location data to the server.
Actual Behavior
On several Android phones (all kind of brands) the application stops tracking in the background. It doesn't send data after a while. Not even after a few days with all kinds of moving and tracking. After opening the app or rebooting the phone it works for a while and then the same problem appears.
Steps to Reproduce
Context
I can reproduce the failure on a Samsung Galaxy S5 with Android 6.0.1. Mostly I receive messages of users and only can see that it stops sending data to the server. The app appears in the Android services list but doesn't do anything.
Debug logs
No logs available
The text was updated successfully, but these errors were encountered: