Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert HTML5 into standalone Android App

I have a dynamic HTML5 document that does not contain any external resources (no images, css and scripts are coded inside of document). This HTML5 application is working fine with internet browser. I was wondering, if it would be possible to convert this HTML5 application into standalone Android application, so it can be executed directly without browser. Please advise.

like image 678
Ωmega Avatar asked Oct 11 '12 13:10

Ωmega


People also ask

Can we convert HTML to Android app?

You could use App Builder to convert html to android app. App Builder can be easily downloaded at google playstore.

Can you run HTML5 on Android?

The responsive design capabilities of HTML5 are particularly well suited to the diverse screen sizes found on Android devices. With a variety of tools available, such as the Intel XDK new IDE, you can deliver a great experience on Android using the open standards of HTML, CSS and JavaScript!

Can I convert HTML to mobile app?

To convert your HTML app to APK, you need to open HTML App Template on AppsGeyser, and insert your code. After that, you need to name the app and upload the icon. It takes up to 5 minutes to build an apk.

Is it possible to use HTML5 for the mobile application?

The same HTML5 app will work on different mobile operating systems, whether that's iOS, Android, Windows Phone or Blackberry; the upshot of this is that the cost of developing the app is much lower than creating native apps for each OS.


2 Answers

Create an Android app using Eclipse.

Create a layout that has a <WebView> control.

Move your HTML code to /assets folder.

Load webview with your file:///android_asset/ file.

And you have an android app!

like image 103
Sudarshan Bhat Avatar answered Sep 28 '22 21:09

Sudarshan Bhat


Edit:

PhoneGap has now been discontinued.

Original answer:

You could use PhoneGap.

http://phonegap.com/

http://docs.phonegap.com/en/2.1.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

This has the benefit of being a cross-platform solution. Be warned though that you may need to pay subscription fees. The simplest solution is to just embed a WebView as detailed in @Enigma's answer.

like image 44
Jimbali Avatar answered Sep 28 '22 19:09

Jimbali