Getting started and documentation on our website: Link
RapidWebView is a library for your Android application which allows you to load websites in a webview with a minimal TTI (Time To Interactive). It also provides a generic set of Javascript Interface functions which can let your website interact with some Android native functionalities.
- Asset cache - keeps a local copy of website assets provided by you during initialisation. Supports asset versioning as well.
- WebView request interceptor - intercepts requests made by webview and serves assets from local copy reducing the website "Time to interactive" time.
- Javascript interface - a generic collection of javascript interface functions which can be used to interactive with native application
We enabled webview content debugging (setWebContentsDebuggingEnabled(true)) and used Lighthouse from Chrome DevTools to measure performance of
the pages loaded with and without RapidWebView SDK. The results can be seen below. A 67.2% improvement in TTI!
- Kotlin
- Retrofit
- Android Architecture Components
Follow the guide here
We're looking to improve this project, open source contribution is encouraged. WorkIndia team will be reviewing the pull requests.
Pull requests
This guide will help you set up the RapidWebView project locally to test and modify the library alongside the sample app.
- Android Studio Koala or later
- Git
- Node.js (for documentation/demo site updates)
git clone https://github.com/workindia/RapidWebView.gitOpen the project in Android Studio Koala. Ensure the Gradle version is compatible with this Android Studio version.
Use the Gradle Wrapper or upgrade the Gradle version if prompted by Android Studio.
Edit the settings.gradle file in the root directory and add the following:
include ':app'
project(':app').projectDir = new File('./samples/RapidWebViewAndroidSample/app')This includes the sample app module in the build.
In the ./samples/RapidWebViewAndroidSample/app/build.gradle build.gradle file of the sample app module:
// implementation 'com.github.workindia:rapidwebview:1.3.0'implementation project(':RapidWebView')This ensures the app uses the local version of the library for development and testing.
-
Make your changes in the
RapidWebViewlibrary code. -
If needed, update the documentation demo site code:
samples/RapidWebViewSdkDocsSite/pages/examples/js-demo.tsx
-
Run the sample app from Android Studio to see your changes reflected.
You're now ready to develop and test the RapidWebView library locally using the sample app.
Happy coding!