tree: 09ceef17ad5c036c42aa08f9e700f3634de32a32 [path history] [tgz]
  1. src/
  2. build.gradle
  3. lint-baseline.xml
  4. README.md
webkit/integration-tests/testapp/README.md

WebView Demo App

See this page rendered in Gitiles markdown.

The WebView/Webkit demo app serves as both a practical demonstration how to use the latest AndroidX Webkit APIs and as a means to exercise those APIs for manual testing.

Building the demo app

cd frameworks/support/

# Optional: you can use Android Studio as your editor
./studiow

# Build the app
./gradlew :webkit:integration-tests:testapp:assembleDebug

# Install the app
./gradlew :webkit:integration-tests:testapp:installDebug

# Check for Lint warnings
./gradlew :webkit:integration-tests:testapp:lintDebug

# Run automated espresso tests
./gradlew :webkit:integration-tests:testapp:connectedAndroidTest

# Optional: launch the app via adb
adb shell am start -n com.example.androidx.webkit/.MainActivity
adb shell am start -n com.example.androidx.webkit/.ForceDarkActivity # or, any exported Activity

Extending the demo app

  1. Add a new Activity under src/main/java/com/example/androidx/webkit/.
  2. Add this Activity to the end of the MenuListView.MenuItem[] array in MainActivity.java, or in a suitable lower-level Activity, like SafeBrowsingActivity.java.
  3. Export this Activity in AndroidManifest.xml. Try to organize your Activity with other related Activities, or leave space if things are unrelated.
  4. If reasonable, write automated test cases for your new Activity, following internal documentation.
  5. Before uploading a change, please take a screen recording using the new Activity in the testapp (Googlers should add this to http://go/wvsl-demo-app-recordings for posterity).
  6. After landing a change, Googlers should upload screenshots and describe expected behavior on http://go/wvsl-demo-app-guide for future reference.

Downloading prebuilt APKs

We do not publicly distribute prebuilt APKs. Googlers can download prebuilt APKs by following these instructions.

Expected behavior

Most Activities have documentation for the expected behavior. See descriptions and screenshots at http://go/wvsl-demo-app-guide, and can see screen recording videos at http://go/wvsl-demo-app-recordings.