How does PhoneGap work?

PhoneGap contains special tools that package the web application into native application for supported mobile platforms. Thus a web application is built for a mobile device.

A native application’s user interface contains a single screen (WebView).

The web application’s startup page (index.html) is launched into the WebView when the application  is launched.

The control is then passed to the user.

User can now interact with the web application on the mobile.

The mobile browser doesn’t ave access to the device-side components (contacts) and device-specific hardware (camera). The native mobile apps may access the device components frequently. The mobile app hence needs access to native device components outside the web container.

Therfore, Phonegap provides JavaScript API’s that allows the web app (within phonegap app container) to access the device components (outside the web context).

This phonegap API call is translated to native API call for a specific feature.

References

Essentials of PhoneGap

Previous
Previous

How to configure an application to wait until the PhoneGap APIs are available?

Next
Next

What is a Hybrid Application?