Skip to content

Instantly share code, notes, and snippets.

@psteiger
Created November 20, 2020 03:23
Show Gist options
  • Select an option

  • Save psteiger/49421537299e85738ba734a0c071e1f5 to your computer and use it in GitHub Desktop.

Select an option

Save psteiger/49421537299e85738ba734a0c071e1f5 to your computer and use it in GitHub Desktop.
LocationFetcher library configuration.
LocationFetcher.create(this) {
fastestInterval = 5000
interval = 15000
maxWaitTime = 100000
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
smallestDisplacement = 50f
providers = listOf(
LocationRequest.Provider.GPS,
LocationRequest.Provider.Network,
LocationRequest.Provider.Fused
)
numUpdates = Int.MAX_VALUE
requestLocationPermissions = true // no effect if built with Context
requestEnableLocationSettings = true // no effect if built with Context
debug = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment