Companion

object Companion

Contains factory methods for creating instances of HybridSearch.

Functions

Link copied to clipboard
fun create(context: Context, apiKey: String, ndsStore: NdsStore, customApiUrl: URL? = null): Search

Creates an instance of HybridSearch. For each API, it runs the OnlineSearch and OfflineSearch implementations in parallel, returns Result.success from the OnlineSearch implementation if succeeds or Result from the OfflineSearch implementation if OnlineSearch implementation fails (Result.failure, exception, or timeout occurs).

fun create(context: Context, apiKey: String, ndsStore: NdsStore, customPoiDataProviders: List<CustomPoiProvider>? = emptyList(), customApiUrl: URL? = null): Search

Creates an instance of HybridSearch with a custom data provider. For each API, it runs the OnlineSearch and OfflineSearch implementations in parallel. Returns Result.success from the OnlineSearch implementation if it succeeds or Result from the OfflineSearch implementation if the OnlineSearch implementation fails (Result.failure, exception, or timeout occurs).