Sep 8 2016
How to convert an HTML5 project into a standalone Android application
A WebView is a mobile application that acts like a real-world window to a website. The user however doesn’t see any browser at all. One would ask: “OK! And what good is to have an application when the same website can be opened by just typing its address in the address-line of the browser?” The whole thing may sound like the ultimate nonsense but actually it is very interesting and useful. First of all, it offers to the user a simpler and friendlier way to open a website. That presentation has the advantage to be of a more professional look, since the webpage is opened without having on the screen the menus and the borders of the web-browser. Thus it is not the same like just creating a link-shortcut on the Home Screen of the mobile device. It can also be used, so that a website will be only a part of the functionality of an application, by first displaying to the user a UI navigation’s menu, like it is such an application called VMedia that I created for a friend who runs a web TV-station.
But that what is of more interesting is that a WebView application can encapsulate a local site with all sub-directories, including the ability to execute JavaScript programs.
In other words, such an application can turn a complete HTML5-project into a standalone package ready for uploading to the market, like it is Google Play or the App Store of Apple.
I will describe in this tutorial the case of creating a WebView application for the Android using the SDK, in the shortest way it can be done. It could come along with a whole bunch of other checking mechanisms (like error handling on loading, alert messages, progress bar, etc.) but I will write another tutorial for this reason.
For the lazy ones, there are several free tools (even online) that pick the main directory of an HTML/HTML5 project and produce an APK package from it but …if we always use tools, not knowing how to do it ourselves …then who’s gonna write the tools?
In the following, I will describe how I created a standalone application from an HTML5 game that I developed, called Spaceball. More
Recent Comments