Developing Native Web AppsJul 28, 2011 | In Tutorials |
You make think that the title of this article is incorrect. Well, today, I will prove to you otherwise. There has been a raging debate for the past year or so: Native Apps or Web Apps? While many think that there are only two distinct possibilities to developing mobile apps, that’s not true. Today, I’ll show you how to make a native Android app using a programming language called Mobl, the Android SDK, and PhoneGap. I won’t actually be writing a tutorial that shows the code, because a great tutorial that shows you how to make a ToDo list can be found right here. Keep reading as soon as you are done with their tutorial.
Now, In order to make a native app, you’ll have to register at PhoneGap. It took me a few minutes to get a beta code, so it shouldn’t take too long for you, either. Once you have uploaded your app at The build page, download the resulting Android .apk file. If you want to test the resulting app in the Android emulator, read on.
Download the Android SDK and install it. Once you’re done with that, go to Eclipse and click on the window option at the top of the program. Then, select the Android SDK and AVD Manager. Install the platform tools for the OS version you wish to target.
Next, we will have to manually download a few files to be able to install apps on the emulator. Go Here, and install the standalone emulator using their instructions.
Once you’re done with that, open up your System Properties (right click on My Computer). In there, open the Advanced System Properties and click on the “Environment Variables” button. Under “System Variables”, find the “PATH” variable and click edit. Add a semi-colon to what is already there, and copy paste your Android SDK tools directory. In my case, it was “C:Program Files (x86)Androidandroid-sdktools”. Add another semi-colon to the end, and copy paste your standalone emulator directory. On my computer, it was “D:EmulatorsAndroid_Emulator_1.5_PCAndroid-Emulator”.
When you’ve edited your environment variables, copy-paste the .adk file you downloaded from PhoneGap to the directory of the standalone emulator.
Now, open up the command prompt (type cmd in the start menu search box). Type “adb”. If you did everything correctly, a bunch of options should fill up the window. Now, type “emulator”. It should say “invalid command-line parameter: Files”.
Next, switch to the Android SDK and AVD Manager. Click on “Virtual Devices” to the left. Create a new device, and start it up. You should now have a running emulator on your screen. When the OS is done loading, open a new command prompt window.
In the command prompt window, type “adb install [your .adk file name]“. After about 20 seconds, it should say “Success”. Now, in the emulator, open up the apps list and start up your application. Congratulations! If you did everything right, your native android app should be running inside the emulator.