This document explains step by step how to turn a local HTML application into a real installable Android app using GitHub Pages and Progressive Web App (PWA) technology.
It includes:
- The exact file structure required
- Correct configuration examples
- Common mistakes that cause installation to fail
- Real issues encountered during setup and how to avoid them
No Play Store account is required.
- A GitHub account
- Your HTML app files
- Google Chrome on Android
- Two PNG icons:
192 × 192512 × 512
Your GitHub repository root folder must contain exactly these files:
/ (root)
│── index.html
│── manifest.json
│── sw.js
│── sale_192.png
│── sale_512.png
GitHub Pages only loads index.html (lowercase).
- ❌ Index.html
- ❌ INDEX.html
- ✅ index.html
If the filename is wrong, GitHub Pages will return a 404 error and the app will never install.
Your HTML must include the manifest link inside the section:
Rules:
- 🔴 Never place this inside
- 🔴 Do not load it dynamically
All JavaScript must be inside proper <script> tags.
Correct example:
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./sw.js');
});
}
</script>
If Service Worker code appears as text on the page, the <script> tag is broken or missing.
Your app icon must NOT touch the edges of the image.
- Leave padding around the logo
- Center it inside the PNG
If the icon touches the edges:
- Chrome will refuse to install the app
- Only “Add to Home screen” will appear
- “Install app” will never show
This is one of the most common silent failures.
- Create a new public repository
- Upload all required files
- Commit to the main branch
- Go to Settings → Pages
- Under Deploy from a branch:
- Branch: main
- Folder: / (root)
- Click Save 4.Wait about 1 minute
❌ Do NOT use:
https://github.com/USERNAME/REPO
https://USERNAME.github.io/REPO/
Only the GitHub Pages URL supports:
- HTTPS
- Service Workers
- App installation
- Open the GitHub Pages URL in Chrome
- Wait 10–15 seconds
- Open the Chrome menu
- Tap Install app
- Confirm installation
If only “Add to Home screen” appears:
- Clear Chrome site data
- Reload the page
- Wait again
- Retry installation
- HTML / CSS / JavaScript changes apply automatically
- If you modify sw.js, increase the cache version
- If you modify manifest.json, users must reinstall the app
- No Play Store required
- Works offline
- Updates are delivered directly from GitHub Pages
- This method creates a real Android app experience