Skip to content
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

Tracking is never turned on for car trips #166

Closed
shankari opened this issue May 5, 2018 · 4 comments
Closed

Tracking is never turned on for car trips #166

shankari opened this issue May 5, 2018 · 4 comments

Comments

@shankari
Copy link
Contributor

shankari commented May 5, 2018

On the android Nexus S test phone, geofence exits are never triggered for car trips.
For example, trips to Tamil school (Sunday, 2018-04-29 at around 9am) and karate (Tuesday, 2018-05-01 at around 5pm) are not recorded. And this is because the geofence exit is never triggered.

@shankari
Copy link
Contributor Author

shankari commented May 5, 2018

Last geofence exit was at

20000,1525214597.214,2018-05-01 15:43:17.214000-07:53,GeofenceExitIntentService : Geofence exited! Intent = Intent { cmp=edu.berkeley.eecs.emission/.cordova.tracker.location.GeofenceExitIntentService (has extras) } Starting ongoing monitoring...

And the associated trip ended at

20326,1525214883.14,2018-05-01 15:48:03.140000-07:53,"CreateGeofenceAction : creating geofence at location 37.3909906, -122.086384"

The created geofence was at the correct location.

But there were no other geofence exits after that, even though there were app launches

20331,1525218683.734,2018-05-01 16:51:23.734000-07:53,"DataCollectionPlugin : google play services available, initializing state machine"
20332,1525218683.7729998,2018-05-01 16:51:23.773000-07:53,"TripDiaryStateMachineRcvr : Setup complete, skipping initialize"
20383,1525218710.7229998,2018-05-01 16:51:50.723000-07:53,"js : Error in registering push notifications SERVICE_NOT_AVAILABLE

and

20384,1525223173.6720002,2018-05-01 18:06:13.672000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525223173048E9
20422,1525227320.214,2018-05-01 19:15:20.214000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525227320135E9
20449,1525230921.2370002,2018-05-01 20:15:21.237000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525230921201E9
20482,1525234532.6120002,2018-05-01 21:15:32.612000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525234532298E9

at which point we again launched the app

20515,1525235023.29,2018-05-01 21:23:43.290000-07:53,"DataCollectionPlugin : google play services available, initializing state machine"

So it looks like we never got a geofence exit while driving. Let's check Sunday (2018-04-29) Tamil school. Similarly, there is nothing between 7:52 and 8:52

14834,1525013522.846,2018-04-29 07:52:02.846000-07:53,"ServerSyncAdapter : Finished sync, sending local broadcast"
14835,1525013522.905,2018-04-29 07:52:02.905000-07:53,BuiltinUserCache : Added value for key stats/client_time at time 1.525013522884E9
14836,1525017122.6320002,2018-04-29 08:52:02.632000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525017122559E9
14837,1525017122.716,2018-04-29 08:52:02.716000-07:53,BuiltinUserCache : Added value for key background/battery at time 1.525017122679E9

The sync at starts at 8:52 and ends at

14861,1525017128.0229998,2018-04-29 08:52:08.023000-07:53,"ServerSyncAdapter : Finished sync, sending local broadcast"
14862,1525017128.0879998,2018-04-29 08:52:08.088000-07:53,BuiltinUserCache : Added value for key stats/client_time at time 1.52501712805E9

But the next log is at 12:28. We got no geofence exits between those two time points.

14863,1525030119.01,2018-04-29 12:28:39.010000-07:53,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.525030118723E9
14864,1525030119.2410002,2018-04-29 12:28:39.241000-07:53,BuiltinUserCache : Added value for key background/battery at time 1.525030119182E9

@shankari
Copy link
Contributor Author

shankari commented May 5, 2018

This phone does not have a data plan, although it does have a cellular radio. I wonder if that is the reason for the missing geofence exits. The documentation suggests that cell towers are used to determine geofence exits, although the cell towers are still accessible so it shouldn't be an issue.

If there is no reliable data connection, alerts might not be generated. This is because the geofence service depends on the network location provider which in turn requires a data connection.

https://developer.android.com/training/location/geofencing

Might turn on cell access for a month to see if it fixes issues.
This may also be related to #155
although in that case it seems that the alert was triggered and then mysteriously dropped.

It may also be related to missing data on the test phone (will document here later).

First step is to activate the data plan and see if it fixes the issue for now.
Second step is to see if this happens even on more recent phone/OS such as Nexus 6.
Third step is to come up with a backup for geofence exit detection. Fortunately, this is android, so we can use the motion activity with a coarse frequency for detecting consistent movement.

@shankari
Copy link
Contributor Author

Activated data plan. Trips do track properly.
Have not done the other two steps due to lack of demand :)

@shankari
Copy link
Contributor Author

shankari commented Dec 8, 2020

Closing this issue since it does appear to be related to the lack of a data plan.

@shankari shankari closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant