r/webdev • • 29d ago

Question Turn HTML file into Android app?

Hi,

I made a simple web app in a single HTML file (URL shortcuts for company website, quote calculator, list of store numbers, etc.). Is there a simple way to convert it into a downloadable Android app?

There are a few web to app converters but no reviews. Are there any that you recommend (for or against)?

Similar reddit and stack overflow posts are from 5+ years ago.

Thanks.

0 Upvotes

20 comments sorted by

3

u/Coderado 29d ago

Not everything needs to be an app. I reject the application of everything.

1

u/Disastrous-Pickle930 29d ago

It's annoying to use my phone browser for it all the time. 

9

u/Discordbothost 29d ago

two routes, depending on how it's used:

  1. PWA. add a manifest.json and a tiny service worker, host the file anywhere over https, and on Android Chrome you get "Install app" with an icon on the home screen. no store, no converter. easiest if people can just open a link.
  2. Capacitor. drop your html into its www folder, run npx cap add android, and build an APK in Android Studio. that's the one if you need an actual .apk to hand out or put on the Play Store.

I'd skip the web-to-app converter sites, most are just a webview wrapper with ads or a subscription bolted on.

8

u/SPEZ_IS_A_JABRONI 29d ago

You could build it into a progressive web app

5

u/seweso 29d ago

Why not a web app? Make it offline with a service worker?

1

u/Xtreme_Neon 29d ago

for a single html file, the easiest route is wrapping it as a pwa (add a manifest and a small service worker, host it over https) so people can install it from chrome's "add to home screen". if you need a real apk, capacitor lets you drop the html/js/css into a project and build an android app from it, and it's free. most "web to app" converters are just a webview wrapper anyway, so doing it with capacitor is usually safer and cleaner.

1

u/Careless_Tax_6418 29d ago

try to use WebView in android studio

1

u/No-Molasses-2097 29d ago

Did exactly this for a single-file internal tool last year. The PWA approach worked fine since it only needed to live on the home screen, no Play Store involved. Capacitor is the way if they need an actual APK file to hand out.

1

u/shitouzxy 28d ago

you can sue expo build for IOS ,Android platform .

0

u/johnschnee 29d ago

What did I just read???

0

u/ddelarge 29d ago

Just ask chatgpt to turn it into a WPA. That way you can "download" it and use it like an app from your phone