Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An Android library which utilises local caching to offer near native experience over WebView.

License

workindia/RapidWebView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RapidWebView SDK

An Android library which utilises local caching to offer near native experience over WebView.


If you like our work you can show support by staring ⭐ this repository πŸ‘


Getting started and documentation on our website: Link


Description

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.

Features

  • 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

Performance

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!
metrics

Technologies used

  • Kotlin
  • Retrofit
  • Android Architecture Components

Getting started

Follow the guide here


Changelog

CHANGELOG.md

Contribution

We're looking to improve this project, open source contribution is encouraged. WorkIndia team will be reviewing the pull requests.
Pull requests

RapidWebView – Local Development Setup

This guide will help you set up the RapidWebView project locally to test and modify the library alongside the sample app.

πŸ“¦ Prerequisites

  • Android Studio Koala or later
  • Git
  • Node.js (for documentation/demo site updates)

πŸ› οΈ Steps to Set Up

1. Clone the Repository

git clone https://github.com/workindia/RapidWebView.git

2. Sync Dependencies

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


3. Link the Sample App

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.


4. Update Sample App Dependencies

In the ./samples/RapidWebViewAndroidSample/app/build.gradle build.gradle file of the sample app module:

❌ Comment out the existing GitHub dependency:
// implementation 'com.github.workindia:rapidwebview:1.3.0'
βœ… Add this line to the dependencies block:
implementation project(':RapidWebView')

This ensures the app uses the local version of the library for development and testing.


5. Modify & Test

  • Make your changes in the RapidWebView library 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 All Set!

You're now ready to develop and test the RapidWebView library locally using the sample app.

Happy coding!

About

An Android library which utilises local caching to offer near native experience over WebView.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5

Languages