r/webdev • u/SmurferJ • 19h ago
Html to .apk for myself
Hi,
Compleet noob. Just learning step by step.
I build myself a very simple html file. It opens in Chrome and lets me count stuff.
I have it as a shortcut in my homescreen. But is it a html icon.
Now I want to build it into an apk. So that is a real app on my phone.
Can I this with htmltoapk.dev? And is it safe?
0
Upvotes
16
u/curious_mind_36 19h ago
You might not need an apk at all. If you put the file online with https (GitHub Pages is free and works fine for a single html file) and add a manifest.json, Chrome on Android will let you install it with your own icon and without the browser bar. The manifest needs a name, start_url, display standalone and two icon sizes (192 and 512px).
It has to be loaded from the https address for that, the file sitting in your phone storage won't work.
If you still want a real apk after that, PWABuilder can make one from the hosted URL. Never used htmltoapk.dev so no idea if it's safe. I'd just be careful installing apks from sites you don't know.
3
u/Syedrafay_56 19h ago
You're already on the right track and Yes, HTML to APK converters can turn your project into an Android app using WebView. Just be cautious about uploading your code to unknown websites. Also, look into PWAs as a safer, simpler alternative for making your HTML project installable like a real app. Keep learning
3
u/JontesReddit 19h ago
With capacitor you can do this locally.
3
u/MrJibberJabber 19h ago
Just use capacitor
2
u/HazemDev 18h ago
I'd skip the html-to-apk sites. You can't see what they wrap around your file, and some inject ads or tracking. For a single counter file the PWA route the others mentioned is honestly the easier path: put the file on GitHub Pages (free https hosting), add a manifest.json with a name and icon plus a tiny service worker, and Chrome on your phone will offer to install it. It then sits on your home screen with its own icon, opens fullscreen like a real app, and works offline. If you ever need an actual apk for the Play Store, Capacitor is the standard tool, but it's a much heavier setup.
1
u/Snowkate8 17h ago
An APK can include code beyond the HTML page, so the converter's output isn't necessarily just your counter. For a basic counter, contacts, location, microphone or camera permissions would be unrelated, check the APK's permissions and don't grant those unless there's a clear reason. Android's app settings let you review permissions after installation too. Before uploading the file, check the converter's privacy terms for how it stores or reuses uploads. The upload policy is a separate question from the APK's phone permissions. If those terms are unclear, don't upload anything you wouldn't want shared.
1
u/Ok_Statistician_997 4h ago
If it's just for yourself, a simple WebView wrapper or Capacitor build does job, no need for anything fancy.
Cordova works too if you want more plguins later.
Just keep in mind signing the apk yourself if you're sideloading it, some phones get fussy about unsigned builds.