• Home
Name Date Size #Lines LOC

..--

chips-enabled-integration-tests/instrumentation/08-Apr-2025-255187

integration-tests/08-Apr-2025-18,13611,675

webkit/08-Apr-2025-30,20018,777

.gitignoreD08-Apr-20257 21

OWNERSD08-Apr-2025101 65

README.mdD08-Apr-20252.8 KiB8258

run_instrumentation_tests.shD08-Apr-2025840 193

README.md

1# androidx.webkit
2
3**See this page rendered in [Gitiles
4markdown](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/webkit/README.md).**
5
6The androidx.webkit library is a static library you can add to your Android
7application in order to use android.webkit APIs that are not available for older
8platform versions.
9
10## Basic info
11
12* [Library owners](OWNERS)
13* [Release notes](https://developer.android.com/jetpack/androidx/releases/webkit)
14* [Browse source](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/webkit/)
15* [Reference docs and guide to import the library](https://developer.android.com/reference/androidx/webkit/package-summary)
16* [Existing open bugs](https://issuetracker.google.com/issues?q=componentid:460423%20status:open)
17* [File a new bug](https://issuetracker.google.com/issues/new?component=460423)
18
19## How to use this library in your app
20
21Add this to your `build.gradle` file:
22
23```
24dependencies {
25    implementation "androidx.webkit:webkit:1.13.0"
26}
27```
28
29**Important:** replace `1.13.0` with the latest version from
30https://developer.android.com/jetpack/androidx/releases/webkit.
31
32## Sample apps
33
34Please check out the WebView samples [on GitHub][GitHub demo app] for a showcase
35of a handful of androidx.webkit APIs.
36
37For more APIs, check out the sample app in the [AndroidX repo][AndroidX demo
38app].
39
40## Public bug tracker
41
42If you find bugs in the androidx.webkit library or want to request new features,
43please [file a
44ticket](https://issuetracker.google.com/issues/new?component=460423).
45
46## Building the library (contributing to the AndroidX library)
47
48If you're trying to modify the androidx.webkit library, or apply local changes
49to the library, you can do so like so:
50
51```sh
52cd frameworks/support/
53# Build the library/compile changes
54./gradlew :webkit:webkit:assembleDebug
55
56# Run integration tests with the WebView installed on the device
57# using this convenience script:
58webkit/run_instrumentation_tests.sh
59# or run the tests directly:
60./gradlew webkit:integration-tests:instrumentation:connectedAndroidTest \
61  -Pandroid.testInstrumentationRunnerArguments.webview-version=factory
62
63# Update API files (only necessary if you changed public APIs)
64./gradlew :webkit:webkit:updateApi
65```
66
67For more a detailed developer guide, Googlers should read
68http://go/wvsl-contribute.
69
70## Instrumentation tests
71
72The instrumentation tests for `androidx.webkit` are located in the
73`:webkit:integration-tests:instrumentation` project. The tests have been split
74out into a separate project to facilitate testing against different targetSdk
75versions.
76
77Any new tests should be added to that project. To run the test, use the command
78above.
79
80[GitHub demo app]: https://github.com/android/views-widgets-samples/tree/main/WebView
81[AndroidX demo app]: /androidx-main/webkit/integration-tests/testapp/README.md
82