Skip to content

Instantly share code, notes, and snippets.

@roscrazy
Created February 8, 2020 07:52
Show Gist options
  • Save roscrazy/ad871c6f80979e881120b55e0b9aa027 to your computer and use it in GitHub Desktop.
Save roscrazy/ad871c6f80979e881120b55e0b9aa027 to your computer and use it in GitHub Desktop.
FusedLocationService requestLocationUpdates
override fun requestLocationUpdates(attributes: RxLocationAttributes): Observable<Location> {
return createLocationObservable(attributes)
.retry { n: Int, e: Throwable ->
(n < attributes.retryAttempt
&& e !is GooglePlayServicesNotAvailableException
&& e !is SecurityException)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment