Getting Started with PhoneGap: Developing for Windows Phone and Android
Table of Contents
With lots of devices and operating systems out there, developing a native application for each of these platforms might not always be an option for many businesses, because of the time, effort and money that would be required to be on all platforms. PhoneGap is one option that could be explored in this case, which helps to develop hybrid applications that can exists on a variety of platforms integrating with platform specific features. Apache Cordova is what powers PhoneGap and is free and open source under the Apache License, Version 2.0.
Setting up PhoneGap is pretty easy and direct with its integration with node.js. Lets take a look on how to setup our project from scratch.
- Install node.js
- Install PhoneGap using node.js
- Install Cordova npm install –g cordova
- Now we have everything setup for PhoneGap project. Lets create the project. Navigate to your project root folder and create a project.
- Lets now create a native project, for windows phone.
- Once we copy out the updated files in platform specific _www _folder into root www folder we can go ahead and add android platform.
With PhoneGap/Cordova, you can see how easy it is to have an app in various platforms of your choice. We have not seen on how to utilize any of the platform specific features of devices using PhoneGap, but I am sure that you should be able to figure out from here, now that you have all that you need up and running.
The source code for the sample is available here. Don’t forget to update the api key for 500px before you run the application.
Rahul Nath Newsletter
Join the newsletter to receive the latest updates in your inbox.