sdk-search / com.tomtom.online.sdk.search / SearchApi

SearchApi

interface SearchApi : RxSearchApi

Defines the TomTom Search API main object. It contains methods to use TomTom's Search engine, and it provides support for standard callback calls.

Properties

DEFAULT_ONLINE_SEARCH_ENDPOINT

static val DEFAULT_ONLINE_SEARCH_ENDPOINT: String

The default TomTom Search API endpoint.

DEFAULT_ONLINE_SEARCH_SERVICE_API_VERSION

static val DEFAULT_ONLINE_SEARCH_SERVICE_API_VERSION: String

The default TomTom Search API service version.

Functions

additionalDataSearch

abstract fun additionalDataSearch(query: AdditionalDataSearchQuery!, listener: AdditionalDataSearchResultListener!): Unit

Performs an Additional Data search action based on the provided query object, and returns the result with usage of the callback implementation.

alongRouteSearch

abstract fun alongRouteSearch(query: AlongRouteSearchQuery!, listener: AlongRouteSearchResultListener!): Unit

Performs an Along Route Search action based on the provided query object and returns the result with usage of the callback implementation.

autocompleteSearch

abstract fun autocompleteSearch(query: AutocompleteSearchQuery!, listener: AutocompleteSearchResultListener!): Unit

Performs an Autocomplete search action based on the provided query object, and returns the result using the callback implementation.

abstract fun autocompleteSearch(autocompleteSpecification: AutocompleteSpecification!): Result<AutocompleteSuggestion!>!

Performs a synchronous Autocomplete search computing action based on the provided AutocompleteSpecification object.

abstract fun autocompleteSearch(autocompleteSpecification: AutocompleteSpecification!, callback: AutocompleteSuggestionCallback!): Unit

Performs an asynchronous POI Categories search computing action based on the provided AutocompleteSpecification object and returns the list of categories in the callback.

batchSearch

abstract fun batchSearch(query: BatchSearchQuery!, listener: BatchSearchResultListener!): Unit

Performs a Batch Search action based on the provided query object, and returns the result with usage of the callback implementation. The number of batch items is limited to 100.

cancelSearchIfRunning

abstract fun cancelSearchIfRunning(): Unit

Cancels all current search requests.

chargingStationsSearch

abstract fun chargingStationsSearch(specification: ChargingStationsSpecification!): Result<ChargingStations!>!
abstract fun chargingStationsSearch(specification: ChargingStationsSpecification!, callback: ChargingStationsCallback!): Unit

Performs a Charging Stations search action based on the provided object and returns the result using the callback implementation.

geometrySearch

abstract fun geometrySearch(query: GeometrySearchQuery!, listener: GeometrySearchResultListener!): Unit

Performs a Geometry Search action based on the provided GeometrySearchQuery object and returns the result with usage of the GeometrySearchResultListener implementation.

isInternetAvailable

abstract fun isInternetAvailable(): Boolean

Checks if the internet is available.

poiCategoriesSearch

abstract fun poiCategoriesSearch(query: PoiCategoriesQuery!, listener: PoiCategoriesSearchResultListener!): Unit

Performs a POI Categories search action based on the provided query object, and returns the result with usage of the callback implementation.

abstract fun poiCategoriesSearch(poiCategoriesSpecification: PoiCategoriesSpecification!): Result<MutableList<PoiCategory!>!>!

Performs a synchronous POI Categories search computing action based on the provided PoiCategoriesSpecification object.

abstract fun poiCategoriesSearch(specification: PoiCategoriesSpecification!, callback: PoiCategoriesCallback!): Unit

Performs an asynchronous POI Categories search computing action based on the provided PoiCategoriesSpecification object and returns the list of categories in the callback.

poiDetailsSearch

abstract fun poiDetailsSearch(specification: PoiDetailsSpecification!): Result<PoiDetails!>!

Performs a synchronous POI Details search computing action based on the provided PoiDetailsSpecification object.

abstract fun poiDetailsSearch(specification: PoiDetailsSpecification!, callback: PoiDetailsCallback!): Unit

Performs an asynchronous POI Details search computing action based on the provided PoiDetailsSpecification object and returns the PoiDetails in the callback.

poiPhotoDownload

abstract fun poiPhotoDownload(specification: PoiPhotoSpecification!): Result<Bitmap!>!

Performs a synchronous POI Photo download action based on the provided object and returns the Bitmap. This method should be run on a separate thread. Running it on the main thread will result in android.os.NetworkOnMainThreadException.

abstract fun poiPhotoDownload(specification: PoiPhotoSpecification!, callback: PoiPhotoCallback!): Unit

Performs a POI Photo download action based on the provided object and returns the result using the callback implementation.

reverseGeocoding

abstract fun reverseGeocoding(query: ReverseGeocoderSearchQuery!, listener: RevGeoSearchResultListener!): Unit

Performs a Reverse Geocode search action based on the provided ReverseGeocoderSearchQuery object and returns the result with usage of the RevGeoSearchResultListener implementation.

search

abstract fun search(searchQuery: FuzzySearchQuery!, listener: FuzzySearchResultListener!): Unit

Performs a search action based on the provided FuzzySearchQuery object and returns the result with usage of the FuzzySearchResultListener implementation.

abstract fun search(fuzzySearchSpecification: FuzzySearchSpecification!): Result<FuzzyOutcome!>!

Performs a synchronous Fuzzy Search computing action based on the provided FuzzySearchSpecification object and returns the FuzzyOutcome.

abstract fun search(fuzzySearchSpecification: FuzzySearchSpecification!, callback: FuzzyOutcomeCallback!): Unit

Performs an asynchronous Fuzzy Search search computing action based on the provided FuzzySearchSpecification object and returns the FuzzyOutcome in the callback.

Inherited Functions

additionalDataSearch

abstract fun additionalDataSearch(query: AdditionalDataSearchQuery!): Single<AdditionalDataSearchResponse!>!

Performs a reactive additional data search action based on the provided query object, and returns the result to Observers subscribed to the returned Observable.

alongRouteSearch

abstract fun alongRouteSearch(query: AlongRouteSearchQuery!): Single<AlongRouteSearchResponse!>!

Performs reactive search along route action based on provided query object and returns the result to Observers subscribed to returned Observable.

autocompleteSearch

abstract fun autocompleteSearch(query: AutocompleteSearchQuery!): Single<AutocompleteSearchResponse!>!

Performs a reactive Autocomplete search action based on the provided query object, and returns the result to Observers subscribed to the returned Observable.

batchSearch

abstract fun batchSearch(query: BatchSearchQuery!): Single<BatchSearchResponse!>!

Performs a reactive Batch Search action based on the provided query object, and returns the result to Observers subscribed to the returned Observable. The number of batch items is limited to 100.

geometrySearch

abstract fun geometrySearch(query: GeometrySearchQuery!): Single<GeometrySearchResponse!>!

Performs a reactive geometry search action based on the provided query object and returns the result to Observers subscribed to returned Single.

poiCategoriesSearch

abstract fun poiCategoriesSearch(query: PoiCategoriesQuery!): Single<PoiCategoriesResponse!>!

Performs a reactive POI Categories search action based on the provided query object, and returns the result to Observers subscribed to the returned Observable.

reverseGeocoding

abstract fun reverseGeocoding(query: ReverseGeocoderSearchQuery!): Single<ReverseGeocoderSearchResponse!>!

Performs a reactive reverse geocoding search action based on the provided query object and returns the result to Observers subscribed to returned Single.

search

abstract fun search(searchQuery: FuzzySearchQuery!): Single<FuzzySearchResponse!>!

Performs a reactive search action based on the provided query object, and returns the result to Observers subscribed to the returned Observable.

Inheritors

OnlineSearchApi

open class OnlineSearchApi : SearchApi

Default TomTom implementation of the entry point to perform a Reverse Geocode search action based on TomTom's Search API.

SearchService

open class SearchService : Service, SearchApi

TomTom Search API wrapped within the Android service. It contains methods to use Tomtom's search engine and it provides support for standard callback calls and RxJava2 Observables. It allows to create a single search instance across an application.