# WebViewStartUpResult

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

*** ** * ** ***


```
public interface WebViewStartUpResult
```

<br />

*** ** * ** ***

Result object associated with `https://developer.android.com/reference/androidx/webkit/WebViewCompat.WebViewStartUpCallback#onSuccess(androidx.webkit.WebViewStartUpResult)`.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Long.html` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpResult#getMaxTimePerTaskInUiThreadMillis()()` The maximum time taken by a task among all the tasks associated with WebView startup in the UI thread. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/webkit/StartUpLocation>` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpResult#getNonUiThreadBlockingStartUpLocations()()` Code locations where WebView startup blocked a non-UI thread. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Long.html` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpResult#getTotalTimeInUiThreadMillis()()` The total time WebView startup took on the UI thread. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/webkit/StartUpLocation>` | `https://developer.android.com/reference/androidx/webkit/WebViewStartUpResult#getUiThreadBlockingStartUpLocations()()` Code locations where WebView startup completely blocked the UI thread. |

## Public methods

### getMaxTimePerTaskInUiThreadMillis

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

```
abstract @Nullable Long getMaxTimePerTaskInUiThreadMillis()
```

The maximum time taken by a task among all the tasks associated with WebView startup in the UI thread.

The return value will be `null` if the underlying WebView version doesn't support this method.

### getNonUiThreadBlockingStartUpLocations

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

```
abstract @Nullable List<StartUpLocation> getNonUiThreadBlockingStartUpLocations()
```

Code locations where WebView startup blocked a non-UI thread.

This is as a debug tool to enable apps to catch code locations where WebView is started up or is about to be started up such that it blocks a non-UI thread.

Example code location: A \`WebSettings.getDefaultUserAgent()\` call on a background thread before calling any other API that triggers WebView startup.

The list will be chronologically ordered based on the time of creation of the stacktrace.

The return value will be `null` if the underlying WebView version doesn't support this method.

### getTotalTimeInUiThreadMillis

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

```
abstract @Nullable Long getTotalTimeInUiThreadMillis()
```

The total time WebView startup took on the UI thread.

The return value will be `null` if the underlying WebView version doesn't support this method.

### getUiThreadBlockingStartUpLocations

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

```
abstract @Nullable List<StartUpLocation> getUiThreadBlockingStartUpLocations()
```

Code locations where WebView startup completely blocked the UI thread.

This is as a debug tool to enable apps to catch code locations where WebView is suboptimally started up even when `https://developer.android.com/reference/androidx/webkit/WebViewCompat#startUpWebView(android.content.Context,androidx.webkit.WebViewStartUpConfig,androidx.webkit.WebViewCompat.WebViewStartUpCallback)` is used.

Example code location: A \`new WebView()\` call on the Android main looper before calling any other API that triggers WebView startup.

The list will be chronologically ordered based on the time of creation of the stacktrace.

The return value will be `null` if the underlying WebView version doesn't support this method.