android-components / mozilla.components.browser.search / SearchEngineManager

# SearchEngineManager

`class SearchEngineManager` (source)

This class provides access to a centralized registry of search engines.

### Constructors

<init> | `SearchEngineManager(providers: List<SearchEngineProvider> = listOf( AssetsSearchEngineProvider(LocaleSearchLocalizationProvider())))` This class provides access to a centralized registry of search engines.

### Functions

getDefaultSearchEngine | `fun getDefaultSearchEngine(context: Context, name: String = EMPTY): SearchEngine` Returns the default search engine.
getSearchEngines | `fun getSearchEngines(context: Context): List<SearchEngine>` Returns all search engines. If no call to load() has been made then calling this method will perform a load.
load | `suspend fun load(context: Context): Deferred<List<SearchEngine>>` Asynchronously load search engines from providers.
registerForLocaleUpdates | `fun registerForLocaleUpdates(context: Context): Unit` Registers for ACTION_LOCALE_CHANGED broadcasts and automatically reloads the search engines whenever the locale changes.