Skip to main content
API Reference com.nianticspatial.nsdk.helpers

LocationHelper

Subscribes to GPS updates via the Fused Location Provider and notifies an [OnUpdateListener] on each new fix. Used internally by [DefaultSessionDataSource].

Declaration

class LocationHelper

Properties

NameTypeSummary
contextContext
-
listenerOnUpdateListener
-

Functions

NameTypeSummary
startLocationUpdatesvoid
Begins receiving GPS updates. Delivers the last known location immediately (if available), then streams new fixes at ~5-second intervals via [OnUpdateListener.onLocationUpdate]. Requires [ACCESS_FINE_LOCATION][android.Manifest.permission.ACCESS_FINE_LOCATION]; no-op if the permission is not granted.
stopLocationUpdatesvoid
Stops receiving GPS updates. Safe to call even if [startLocationUpdates] was never called.