π±Android / iOS
Compass supports Autocomplete natively on Android and iOS by using the built in Geocoding services.
Getting started
To get started with Autocomplete on Android and iOS, you need to create an instance of Autocomplete<Place>
:
val autocomplete = Autocomplete.mobile()
Then you can use the autocomplete
instance:
val results = mutableListOf<String>()
suspend fun search(query: String) {
val result = autocomplete.getOrNull() ?: return
if (result.isNotEmpty()) {
results.clear()
results.addAll(result)
}
}
Last updated
Was this helpful?