Hello developers’ community! If you are reading this article which is called ‘What HTML Development Tools You Need To Make Android Apps’, you are probably interested in creating your own Android application based on HTML. Fortunately, modern technology makes it possible to develop a mobile application in more than one way. Knowing HTML, you can create a site based on it, change it with special tools and get the application.
With a tool like PhoneGap, you can put this approach into a real development process. PhoneGap is the name of the library for turning a website into a real application for a mobile device. Such an application can use the functions of the phone, for example, call or receive pictures from the camera. From this article, you will learn how to set up a development environment and make a simple application using PhoneGap and about some more HTML tools for Android development. Let’s start from the beginning!
Why did I select PhoneGap out of all the HTML development tools? PhoneGap was created about ten years ago as an open source framework that allowed access to native device functionality from a webview. The goal of the project was to provide the ability to build mobile applications exclusively on HTML web technologies, but with the ability to call native code. As you can understand, this technology is perfect not only for experienced developers, but also for beginners who have basic knowledge of HTML and want to create their own Android application. Or, for example, you have a basic understanding of Objective-C and Java, but you are much closer to HTML web technologies and want to use your existing skills when developing native applications.
This opportunity is actually provided by PhoneGap. If you have a single code base on a traditional HTML, PhoneGap can easily package it natively for almost any mobile platform (in our case, the Android platform). Thus, you gain the broadest possibilities, since you significantly save time spent on cross-platform development, and also you do not have to learn a whole bunch of programming languages. Now, you have an understanding about this technology and we can start setting up an environment for developing an Android application. Our goal is to write HTML code that instantly packs as a native Android app.
1. The very first thing to do is install development tools. We will need:
- • Eclipse Classic 3.6.2 or newer version;
- jdk latest version (32-bit version even if PC is set to 64-bit);
- Android SDK;
- Android ADT Plugin.
Let’s start downloading the SDK Platform, in this case we will definitely need Android 2.2. After that, install the ADT Plugin in a slightly unusual way: open Eclipse, click Help → Install New Software → Add. You should open a dialog box and enter into it: Name: ADT Plugin, Location. Click “Ok”, select Developer Tools and wait until the end of the installation. Now you need to show Eclipse where the Android SDK is located: Window → Preferences, on the left, click Android → SDK Location → specify the address of your Android SDK → Apply → Ok. Now go to My Computer → (Right Mouse Button) → Advanced System Settings → Environment Variables → System Variables → Create Name and Value. Then find the Path variable and add to the end: %JAVA_HOME%\bin.
2. After the installation of all the necessary tools is completed, we proceed to create a project. To create a project you need to open Eclipse → File → New → Project → Android project and fill out the dialog box. Create two new folders in your project folder: /libs and /assets/www.
3. Let’s get started with PhoneGap by downloading it. Open the archive and find the “Android” folder, into which we copy two more already created folders and additionally the xml folder into the /res folder. Now in Eclipse, open our project and show it where the PhoneGap library lives: right-click libs → Build Path → Configure Build Path and select phonegap.0.9.5.jar. After that, open the .java file and make changes: connect the phonegap (line 5), remove the scrollbars (lines 12 and 13) and load the main page (line 14). Then you have to work with the AndroidManifest.xml file.
4. Now remains to write the index.html page and save it to /assets/www/.
5. Is it really a project launch? Right click on the project and click Run As → Android Application. Eclipse will ask you to create an emulated device so enter the specifications and run the project. To run on your device, make sure that USB debugging is enabled on your device and connect it to your computer (Settings → Applications → Development).
Here are five easy steps for a talented developer to create an application using one of the most popular HTML tools. I am sure that not only me, but also most of the developers feel without mobile devices are useless. Fortunately, we live in a time when mobile development is becoming the norm, and more and more really convenient applications are entering the market, with which you can not only correct a line of code, but also fully continue working on your project. Therefore, I want to supplement this guide with a list of applications for Android devices that will allow you to effectively develop from your mobile device from anywhere in the world.
- DroidEdit. If you’re looking for the perfect source code text editor for your tablet or phone, it’s hard to recommend anything better than DroidEdit. Syntax highlighting for languages including C, C ++, HTML, CSS, JS, Ruby, Python and many more. The technology is paid, but before buying you can test the free version.
- kWS Web-Server is a lightweight and fast (and free) web server for your phone. You can host websites or you can use it for FTP access. It has many other interesting features. It also provides developers with a paid PRO version.
- AIDE. This application should appeal to developers of mobile applications for Android. It is compatible with the Eclipse project and allows you to easily transfer your application projects from work computer to phone. It is also compatible with Dropbox.
As you can see, full mobilization is just around the corner, and it’s getting easier to create and manage your projects with comfort. From the article you learned about the popular PhoneGap development tool, which is ideal for those who are familiar with HTML and practice creating Android applications. Thanks for reading an article ‘What HTML Development Tools You Need To Make Android Apps’. Happy development process!