# 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)

*** ** * ** ***


```
public final class WebViewStartUpConfig
```

<br />

*** ** * ** ***

Configuration object for `https://developer.android.com/reference/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/androidx/webkit/ProcessGlobalConfig`. This object defines the configuration for a particular call to `https://developer.android.com/reference/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,androidx.webkit.WebViewOutcomeReceiver<androidx.webkit.WebViewStartUpResult,androidx.webkit.WebViewStartupException>)`

## Summary

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

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/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://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/Set.html<@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpConfig#getProfilesToLoadDuringStartup()()` Returns the `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/androidx/webkit/Profile` names to be loaded during the UI thread blocking parts of WebView startup. |
| `boolean` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpConfig#shouldRunUiThreadStartUpTasks()()` Whether to run only parts of startup that doesn't block the UI thread. |

## Public methods

### getBackgroundExecutor

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

```
public @NonNull Executor getBackgroundExecutor()
```

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/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)

```
public @Nullable Set<@NonNull String> getProfilesToLoadDuringStartup()
```

Returns the `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/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/androidx/webkit/WebViewStartUpConfig.Builder#setProfilesToLoadDuringStartup(java.util.Set<java.lang.String>)`.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/Set.html<@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html>` | A `https://developer.android.com/reference/java/util/Set.html` of `https://developer.android.com/reference/androidx/webkit/Profile` names to be loaded, or `null` if this configuration setting is not active. |

| See also |
|---|---|
| `https://developer.android.com/reference/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)

```
public boolean shouldRunUiThreadStartUpTasks()
```

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/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.