Thomas came to the ios point of view, so I have to make Android to complete the image. From my point of view, using phonegap seems redundant.
If all you need is a "branded browser" that only loads your mobile site, then it would be faster to have one action that loads one WebView . It is essentially a browser without user interface controls (there is support for JavaScript, but no Flash).
You can do the basics:
1) Layout creation
<?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" />
2) Specify the URL to download
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.google.com"); }
With tiny reading, you can cope with the lack of an Internet connection by doing what you would like to do. For reference, use the Google Tutorial at http://developer.android.com/resources/tutorials/views/hello-webview.html
We have some code, but to answer the question “why is this so? I want to use Phonegap” - a simple answer: it’s much “easier” because I didn’t have to turn on Phonegap, but I achieved the same result, the application will load faster and execute the same job.
I told our Ios dev that a similar web view exists for Ios and offers similar functionality. However, this is not my area.
You did not need to learn much about programming on Android to do this, and the same process will still go through to send the application to the market.
source share