I'm trying to use TOMTOM search API in my kotlin application
Here is my code :
private fun testSearch() {
val observer = object : DisposableSingleObserver<FuzzySearchResponse>() {
val text = "cairo"
val search = FuzzySearchQueryBuilder.create(text).build()
override fun onSuccess(fuzzySearchResponse: FuzzySearchResponse) {
search.success(fuzzySearchResponse.results)
}
override fun onError(throwable: Throwable) {
search.error(null, Error(throwable.message))
}
}
}
added API to AndroidManfist.xml
and initialized tomtom search in my Gradle
file
as shown in the image, the IDLE can't find both reference error or success.