Skip to content

Instantly share code, notes, and snippets.

@ngengesenior
Created June 12, 2024 18:55
Show Gist options
  • Select an option

  • Save ngengesenior/cf4cc2492fee7854774f0a726885d2cb to your computer and use it in GitHub Desktop.

Select an option

Save ngengesenior/cf4cc2492fee7854774f0a726885d2cb to your computer and use it in GitHub Desktop.
suspend fun requestCurrentLocation(): Result<CLLocation> =
suspendCancellableCoroutine { continuation ->
locationResultContinuation = continuation
locationManager.requestLocation()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment