+ 1
How to convert html file into apk
I have a good knowledge and practice of javascript. I want to publish a game but the problem is that a html file cannot be shared. I want to ask how can i convert my html code into apk.Please tell a secure and free way to do this
15 Answers
+ 5
https://code.sololearn.com/Wx8a6zsqSx9v/?ref=app
It is surprisingly easy.
+ 5
You can't convert HTML to android package(apk) like image(jpg => png) but you need to look at 👀 " app development with javascript"
https://www.sololearn.com/discuss/815244/?ref=app
https://www.sololearn.com/discuss/2136138/?ref=app
https://www.sololearn.com/discuss/1769303/?ref=app
https://www.sololearn.com/discuss/2471175/?ref=app
https://www.sololearn.com/discuss/1507286/?ref=app
if you can even it won't be functional app
+ 5
Raghu Rao I know what @frogged says, he say "downloading webview lib in Android studio and putting js and HTML " but it is not easy as image you need to download android sdk, android studio, there is also many java library you need it to run the webview as Martin Taylor mentioned it
+ 1
Raghu Rao if you know reactjs then learn react native. Then you will be able to convert your react native project to apk.
If you don't know reactjs or new to javascript. Use service worker and make it a progressive web app.
You can host your game on netlify or GitHub. After hosting on netlify or GitHub your game will be live on internet.
Now, you can share link provided netlify or GitHub to share your game.
Don't forget to use webpack. So, that others can not do reverse engineering on your game.
+ 1
So what can I do to publish my game on playstore.
I mean should I change the language to C# and start unity
+ 1
Or stay with js only
+ 1
There Are 2 Methods:
1) In Android Studio (FREE): https://youtu.be/CjiSaGWvsEU
2) MIT App Inventor (FREE):
i) Upload The App Files to A Web Hosting Server: https://www.youtube.com/results?search_query=free+html+web+hosting
ii) Then See This Tutorial: https://youtu.be/TesEcpLeC3g
iii) Build The Apk, Enjoy!
Note: Second Method Needs Internet Connection!
Hope It Will Help...
0
Ananiya Jemberu I think your answer is completely wrong
Check the answer of Frogged
0
Thanks alot Martin Taylor
0
var skipAd = document.getElementById('skip_button'); skipAd.click();
0
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tic-Tac-Toe</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, #74ebd5, #9face6);
color: #333;
animation: backgroundShift 10s infinite alternate;
}
@keyframes backgroundShift {
0% { background: linear-gradient(135deg, #74ebd5, #9face6); }
100% { background: linear-gradient(135deg, #ff9a9e, #fad0c4); }
}
h1 {
font-size: 2.5rem;
margin: 10px;
text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}
#start-screen, #game-container {
display: none;
flex-direction: column;
align-items: center;
}
#start-screen.active, #game-container.active {
display: flex;
}
#game-board {
display: grid;
grid-template-columns: repeat(3, 100px);
grid-template-rows: repeat(3, 100px);
gap: 10px;
margin: 20px 0;
}
.cell {
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 100px;
font-size: 2rem;
font-weight: bold;
color: white;
background: #333;
border-radius: 10px;
cursor: pointer;
transition: transform 0.2s, background 0.3s ease;
}
.cell:hover {
background: #555;
transform: scale(1.1);
}
.cell.taken {
cursor: not-allowed;
}
.cell.x {
background: #74b9ff;
color: white;
transform: scale(1.1) rotate(360deg);
}
.cell.o {
background: #ff7675;
color: white;
transform: scale(1.1) rotate(-360deg);
}
#status, #scores {
margin: 10px 0;
font-size: 1.2rem;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
button {
padding: 10px 20px;