PhoneGap Introduction
The applications designed with the help of PhoneGap are not like normal websites. The applications designed with PhoneGap easily interact with mobile device hardware, such as the Accelerometer or GPS, in ways that are non-existent to normal web applications. Moreover, the PhoneGap applications are also designed and packaged like native applications, indicates that they can be assigned through the Apple App Store or the Android Market.
The applications designed with the help of PhoneGap are not like normal websites. The applications designed with PhoneGap easily interact with mobile device hardware, such as the Accelerometer or GPS, in ways that are non-existent to normal web applications. Moreover, the PhoneGap applications are also designed and packaged like native applications, indicates that they can be assigned through the Apple App Store or the Android Market.
- Android
- iPhone
- Blackberry
- Symbian
- Palm
PhoneGap API also supports many hardware specific features, which includes:
- Geolocation
- Vibration
- Accelerometer
- Sound
What Are The Requirements?
If you want to create applications using PhoneGap, you need to install the standard SDK for the mobile platforms you want to spot for your app. In order to create applications with PhoneGap, you will need to first install the standard SDK for the mobile platforms you want to target for your app. This is required only because, the PhoneGap have to use SDKs when assembling your app for that platform.
To develop an application for Android, you will require:
- Android NDK
- Android SDK
Apart from these, some additional PhoenGap specific requirements for Android development, includes:
- Eclipse IDE
- ADT plugin for Eclipse
- Apache Ant
- Ruby
- Git Bash (Windows Only)
Now let’s check out the complete PhoneGap Android documentation, which provides the complete list of requirements to install instructions for each.
For the development of the iPhone, you will require:
- An Intel-based Apple Computer
- IPhone SDK
- Xcode
- Mac OS X Snow Leopard
Learn How To Build The Default Phonegap App For Android!
First Step: Goto the "phonegap-android" folder on the command prompt or terminal.
Run the below command:
1 ruby ./droidgap "[android_sdk_path]" [name] [package_name] "[www]" "[path]" |
- android_sdk_path - Path where you installed the Android SDK.
- name - The name to give the new application.
- package_name - The name you want to give to your application.
- www - The folder from where you want to copy the files of your PhoneGap app. Leave this blank for now.
- path - The application workspace for your project.
Once you have successfully run the commands, the path you have given will be occupied by the application workspace. After this, open your Eclipse and choose "New Android Project" and after that, choose "Create From Existing Source" and make a selection of the application workspace, which was built with the previous command.
Once you are done with the above process, copy the following files from the phonegap/phonegap-android/example folder to the www folder in your workspace:
- Index.html
- Master.css
Procedure For Building The Default Phonegap App For iPhone
Do you want to create a PhoneGap app for iPhone? Follow these steps:
Go to the phonegap-iphone folder, where you have unzipped the PhoneGap files.
Once you enter into that folder, in your terminal type ‘make’ to buildPhoneGapLibInstaller.pkg.
Now run “PhoneGapLibInstaller.pkg”, which will install the PhoneGapLib and the PhoneGap template in Xcode.
Launch Xcode and create a ‘New Project’. Then choose PhoneGap based application template.
After completing the above process, now copy the following files into the www folder of your workspace:
- Index.html
- Master.css
Why Should You Choose Phonegap For Enterprise Mobile App Development?
Before you start working with the PhoneGap, try to consider the important features require to design an application for the proper functioning. The features included are as follows:
- Internet connectivity validation: the developer need to make sure about the connectivity. It means, he should detect that the users are able to easily access the data via the net.
- Animations: Should consider to make proper use of an animation. What actually happens? In some of the cases, the last view by the user might slide off-screen on the left and show the detail view when the item is selected.
- List View: This feature enables the users to scroll the list of offers and make a selection to see for more details. The list view is a common design in mobile applications.
- Facebook SDK Support: The platform should provide an interface to the user, that make it possible for the user to directly log in to the application via their Facebook account.
- Notifications: this feature enables the user to view the notifications regarding important information, even when the application is not running on the device.
- Device Detection: It is the efficiency to determine the kind of device that the application is specifically running on and the type of features that it supports.
- GeoLocation: the application should be so flawless, that it determines the location of the user and provide the required information based on the location.
It is sure, that any applications developed by using this platform will have static UIs based on HTML or have dynamic and interactive experiences that are specially developed by using the platform of JavaScript. The best part is, that these apps designed are easily used as zoom gestures to zoom in or out and the user can lock the viewport scale by using the metadata tag.