Skip to content

[Geolocation] Background low-power / significant location change Geolocation updates #1195

@timfpark

Description

@timfpark

An application we are building has a need for Foursquare style persistent low power / low accuracy location updates.

In our all native app, we are using CLLocation::startMonitoringSignificantLocationChanges to do this.

I'd like to propose that we add this to Geolocation:

  1. Add a "background" option that translates to asking for requestAlwaysAuthorization on iOS.

then either:

  1. Redefine the "enableHighAccuracy" option to use startMonitoringSignificantLocationChanges instead of startUpdates when this is false. This seems to be the intent of what the W3C spec was looking for here in terms of providing a bool for this.

-or-

  1. Add a "networkBasedUpdates" boolean option that when true uses startMonitoringSignificantLocationChanges on iOS and LocationManager.NETWORK_PROVIDER on Android.

I think I understand the code well enough to provide a PR for this. Let me know your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions