Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: PhoneGap vs Webview

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?

like image 916
DataGuy Avatar asked May 18 '12 14:05

DataGuy


People also ask

What is alternative of WebView in Android?

Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.

Is WebView deprecated in Android?

This interface was deprecated in API level 12. This interface is now obsolete.

What is the difference between WebView and app?

If we remove the engine part from the browser, we basically get a webview. When this engine is placed in a native app, we get a webview app. Basically, any app that loads content from a web page is a webview app. Use a mobile app builder for iOS and Android.


1 Answers

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.

like image 78
user1403649 Avatar answered Sep 24 '22 04:09

user1403649