The readme page and the source code of this repository was written for the course 'Current Trends in Web Standards-based UI Design', which took place at the HTW Berlin.
You can download the app and test it (currently not working in iOS).
Here you can find the corresponding presentation.
What is PhoneGap?
Why do we need PhoneGap?##
- Java (Dalvik VM)
- Windows Phone
Listing 1: Platforms and their programming languages
As you can see, both approaches have their benefits and disadvantages. The idea of mobile development tools like PhoneGap is to join the benefits of both approaches:
- The application is cross-platform
- The apps are written in JS, HTML & CSS
- You don’t need to know any native code
- The application has access to the device (see listing 2) The only disadvantage is, that the performance will never be as good as it would be with a native app.
History of PhoneGap
How does PhoneGap work?
Developing with PhoneGap
PhoneGap offers two different approaches to develop applications. Either with a SDK for each supported platform and building the application by yourself or with the usage of GitHub� (uploading the code is also possible) and the PhoneGap build service�. With the first approach the developer has full control over the whole building process. He can browse the native code and use IDE build-in device emulators. As already mentioned a SDK for each supported platform and different IDEs are needed. Developing for Android, Windows Phone and iOS means that at least two operating systems are required. Another interesting point is that choosing this way involves not worrying about public or private repositories and if the project should be open source or not. The second approach is an „easy-as-it-can-be-solution“ for building mobile applications. But building doesn't mean debugging. This implies that updating the application on the phone is required every time it will be tested. Hydration� provides a simple solution by delivering the updates directly to the device. How easy the build and update process is by using the PhoneGap build service, will be shown below.
The conjunction with GitHub is one of PhoneGaps biggest advantages. When signed in via the GitHub account, the developer can browse and choose all of his - private or public - repositories.
For open source projects or beginners who just want to test PhoneGap, the so called Free plan can be chosen. With unlimited open source and one private application all functionalities (including Hydration) can be used.
As mentioned before, for each project a GitHub repository can be chosen. Alternatively the upload of a zipped file is possible.
Once the source code is uploaded or the project is connected to a GitHub repository, rebuilds are possible and the ready-build applications for all platforms are available for download.
Listing 10 and 11: Update detection and automatic update with Hydra
One simple example application
In this repository you can find a sample application, where you can see
- How to use the config.xml
- How to use the accelerometer
- How to use the geolocation together with the Google Maps API
- How to use the camera
[ 1 ] ROSS, Marcus: PhoneGap (2013) Page 2
[ 4 - 9 ] https://build.phonegap.com
[ 10 - 11 ] Sceenshots from the authors device
ROSS, Marcus: PhoneGap (2013).
LUNNY, Andrew: PhoneGap Beginner’s Guide (2011).