# WebViewStartUpConfig

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/WebViewStartUpConfig.java+class:androidx.webkit.WebViewStartUpConfig) Added in [1.13.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.13.0)

*** ** * ** ***


```
class WebViewStartUpConfig
```

<br />

*** ** * ** ***

Configuration object for `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,androidx.webkit.WebViewOutcomeReceiver<androidx.webkit.WebViewStartUpResult,androidx.webkit.WebViewStartupException>)`

This is different from `https://developer.android.com/reference/kotlin/androidx/webkit/ProcessGlobalConfig`. This object defines the configuration for a particular call to `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,androidx.webkit.WebViewOutcomeReceiver<androidx.webkit.WebViewStartUpResult,androidx.webkit.WebViewStartupException>)`

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig.Builder` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig#getBackgroundExecutor()()` Returns the `https://developer.android.com/reference/java/util/concurrent/Executor.html` that will be used by WebView to run background startup tasks. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>?` | `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig#getProfilesToLoadDuringStartup()()` Returns the `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/kotlin/androidx/webkit/Profile` names to be loaded during the UI thread blocking parts of WebView startup. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig#shouldRunUiThreadStartUpTasks()()` Whether to run only parts of startup that doesn't block the UI thread. |

## Public functions

### getBackgroundExecutor

Added in [1.13.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.13.0)

```
fun getBackgroundExecutor(): Executor
```

Returns the `https://developer.android.com/reference/java/util/concurrent/Executor.html` that will be used by WebView to run background startup tasks.

Note that this executor is not used to invoke the startup completion callback; to specify an executor for the callback, use `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,java.util.concurrent.Executor,androidx.webkit.WebViewOutcomeReceiver<androidx.webkit.WebViewStartUpResult,androidx.webkit.WebViewStartupException>)`.

### getProfilesToLoadDuringStartup

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.15.0)

```
fun getProfilesToLoadDuringStartup(): (Mutable)Set<String>?
```

Returns the `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/kotlin/androidx/webkit/Profile` names to be loaded during the UI thread blocking parts of WebView startup.

For more details on the behavior of this setting, see the documentation for `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig.Builder#setProfilesToLoadDuringStartup(java.util.Set<java.lang.String>)`.

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>?` | A `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/kotlin/androidx/webkit/Profile` names to be loaded, or `null` if this configuration setting is not active. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewStartUpConfig.Builder#setProfilesToLoadDuringStartup(java.util.Set<java.lang.String>)` |   |

### shouldRunUiThreadStartUpTasks

Added in [1.13.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.13.0)

```
fun shouldRunUiThreadStartUpTasks(): Boolean
```

Whether to run only parts of startup that doesn't block the UI thread.

WebView startup tasks that are required to run on the UI thread are not attempted when `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,androidx.webkit.WebViewOutcomeReceiver<androidx.webkit.WebViewStartUpResult,androidx.webkit.WebViewStartupException>)` is called if set to `false`.

Defaults to \`true\`. If not set to \`false\`, UI thread startup tasks will be run.