android-components / mozilla.components.browser.search.provider / AssetsSearchEngineProvider

# AssetsSearchEngineProvider

`class AssetsSearchEngineProvider : SearchEngineProvider` (source)

SearchEngineProvider implementation to load the included search engines from assets.

A SearchLocalizationProvider implementation is used to customize the returned search engines for the language and country of the user/device.

Optionally SearchEngineFilter instances can be provided to remove unwanted search engines from the loaded list.

Optionally additionalIdentifiers to be loaded can be specified. A search engine identifier corresponds to the search plugin XML file name (e.g. duckduckgo -> duckduckgo.xml).

### Constructors

<init> | `AssetsSearchEngineProvider(localizationProvider: SearchLocalizationProvider, filters: List<SearchEngineFilter> = emptyList(), additionalIdentifiers: List<String> = emptyList())` SearchEngineProvider implementation to load the included search engines from assets.

### Functions

loadSearchEngines | `suspend fun loadSearchEngines(context: Context): List<SearchEngine>` Load search engines from this provider.