Android: PhoneGap vs Webview

android, cordova, webview

Solution

The advantage of PhoneGap is that it provides APIs that enable your HTML/javascript to interact with the phone (e.g. camera, accelerometer, media etc.)

These APIs are standard across multiple devices (iOS, Android, WinPhone, Blackberry etc.). So you can write one set of HTML/javascript and deploy to multiple platforms.

If you just created a WebView you would not have the PhoneGap APIs and you would need to build containers on each platform you were interested in.

Problem

I have been researching PhoneGap and I'm now at an impasse and need some advice. I know that PhoneGap essentially 'converts' html5,css,JS sites to 'apps' for distribution, which leads me to my question: Why wouldn't one simply utilize a webview within an activity to do the same thing and keep the app native?

Original source