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

Enable OPGeofence by default #203

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Apr 4, 2023

We've been testing the OPGeofence for a while, and it seems

  • pretty stable, and
  • not leading to too much drain

It is also going to become significantly more important if/when we remove the continuously-on foreground service, since the geofence transition is likely to be even more delayed if we are not in the foreground and are subject to more background restrictions.

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

Alerts can be late. The geofence service doesn't continuously query for
location, so expect some latency when receiving alerts. Usually the latency is less than 2 minutes, even less when the device has been moving. If Background Location Limits are in effect, the latency is about 2-3 minutes on average. If the device has been stationary for a significant period of time, the latency may increase (up to 6 minutes).

Note: On Android 8.0 (API level 26) and higher, if an app is running in the
background while monitoring a geofence, then the device responds to
geofencing events every couple of minutes.

So let's turn OPGeofence on all the time and hope to get quicker transitions than we would with the classic geofence

  • Add a hack that would delete any previous configs so that we don't have zombie configs sitting around confusing things. This can be removed in the next release.

We've been testing the OPGeofence for a while, and it seems
- pretty stable, and
- not leading to too much drain

It is also going to become significantly more important if/when we remove the
continuously-on foreground service, since the geofence transition is likely to
be even more delayed if we are not in the foreground and are subject to more
background restrictions.

https://developer.android.com/training/location/geofencing
> Alerts can be late. The geofence service doesn't continuously query for
location, so expect some latency when receiving alerts. Usually the latency is
less than 2 minutes, even less when the device has been moving. If Background
Location Limits are in effect, the latency is about 2-3 minutes on average. If
the device has been stationary for a significant period of time, the latency
may increase (up to 6 minutes).

> Note: On Android 8.0 (API level 26) and higher, if an app is running in the
> background while monitoring a geofence, then the device responds to
> geofencing events every couple of minutes.

So let's turn OPGeofence on all the time and hope to get quicker transitions
than we would with the classic geofence

+ Add a hack that would delete any previous configs so that we don't have zombie
configs sitting around confusing things. This can be removed in the next release.
@shankari shankari merged commit 6d2c432 into e-mission:master Apr 4, 2023
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

Successfully merging this pull request may close these issues.

1 participant