createSearchEngineWithBuiltInDataProviders

fun createSearchEngineWithBuiltInDataProviders(settings: SearchEngineSettings, executor: Executor = SearchSdkMainThreadWorker.mainExecutor, callback: CompletionCallback<Unit> = StubCompletionCallback()): SearchEngine

Creates a new instance of the SearchEngine with a default ApiType and default data providers ( com.mapbox.search.record.HistoryDataProvider and com.mapbox.search.record.FavoritesDataProvider) registered by default.

Return

a new instance of SearchEngine.

See also

Parameters

settings

SearchEngine settings.

executor

Executor used for events dispatching. By default events are dispatched on the main thread.

callback

Callback to handle result.

fun createSearchEngineWithBuiltInDataProviders(apiType: ApiType, settings: SearchEngineSettings, executor: Executor = SearchSdkMainThreadWorker.mainExecutor, callback: CompletionCallback<Unit> = StubCompletionCallback()): SearchEngine

Creates a new instance of the SearchEngine with default data providers ( com.mapbox.search.record.HistoryDataProvider and com.mapbox.search.record.FavoritesDataProvider) registered by default.

Return

a new instance of SearchEngine.

See also

Parameters

settings

SearchEngine settings.

apiType

The type of the API used by the Search Engines. By default ApiType.GEOCODING will be used. Note that ApiType.GEOCODING is the only available publicly. You might need to contact sales to enable access for other API types.

executor

Executor used for events dispatching. By default events are dispatched on the main thread.

callback

Callback to handle result.