Created
January 12, 2021 09:15
-
-
Save lagner/8cff771aeb1c252b38b7fde85e3e7f42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val searchManager = SearchManager.createOnlineManager(sdkContext)!! | |
val query = SuggestQueryBuilder | |
.fromQueryText("Домодедово") | |
.build()!! | |
searchManager.suggest(query).onResult { | |
val result = it ?: return@onResult | |
result.suggests().filterNotNull().forEach { | |
val ptr = it.handler() | |
if (ptr is SuggestObjectHandler) { | |
Log.i("##", "- ${ptr.item()?.address()}") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment