google / google/ground-android
[Code health] Use `getFromLocation` with `GeocodeListener` instead of deprecated blocking version
Open
type: code health
- Dominant language
- Kotlin
- Stars
- 293
- Forks
- 149
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 42
Description
Adapter for Coroutines might look something like this:
```kt
internal class CancellableGeocodeListener(
private val cont: CancellableContinuation>
) : GeocodeListener {
@OptIn(ExperimentalCoroutinesApi::class)
override fun onGeocode(addresses: MutableList
override fun onError(errorMessage: String?) {
cont.cancel(errorMessage?.let { error(it) })
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.