A minimal Android app template that wraps any HTML/CSS/JS project into a native Android application using a WebView. No complex Android development required — just drop in your web files and build.
The app launches a fullscreen WebView that loads a local HTML file bundled with the APK. Your entire frontend (HTML, CSS, JavaScript) lives in the assets folder and runs inside the WebView as if it were a browser.
app/
└── src/
└── main/
├── assets/
│ └── snoop/ ← PUT YOUR WEB FILES HERE
│ └── main.html ← Entry point (loaded on launch)
├── java/.../MainActivity.kt ← WebView setup (no need to touch)
└── res/
└── values/
└── strings.xml ← Change app name here
Place your HTML, CSS, and JS files inside:
app/src/main/assets/snoop/
Make sure your entry point is named main.html. All relative paths (CSS, JS, images) work as normal.
Edit app/src/main/res/values/strings.xml:
<string name="app_name">Your App Name</string>Open the project in Android Studio, connect a device or start an emulator, and hit Run.
Key WebView settings in MainActivity.kt:
| Setting | Value | Description |
|---|---|---|
javaScriptEnabled |
true |
Enables JS execution |
mediaPlaybackRequiresUserGesture |
false |
Allows autoplay audio/video |
| Entry URL | file:///android_asset/snoop/main.html |
Change folder/file name here if needed |
To change the assets subfolder or entry file, update this line in MainActivity.kt:
webview.loadUrl("file:///android_asset/YOUR_FOLDER/YOUR_FILE.html")- Android Studio (Hedgehog or newer recommended)
- Min SDK: as configured in
build.gradle - No internet permission required (loads local files only)
- The app uses a
NoActionBartheme for a clean fullscreen experience. - The
onDestroy,onPause, andonResumeWebView lifecycle methods are included but commented out — uncomment them for better memory management in production. - This template does not use Jetpack Compose for the main UI — the WebView is set directly as the content view.