Accessing external website from PhoneGap application

To create a PhoneGap application, To load external webpage into android application by following the instruction.


1) Create phonegap application and configure with android.

2) Then open your activity file and make the changes, onCreate() method is calling super.loadUrl(“”); so that page is opened in the WebView as soon as application starts

super.loadUrl(“file:///android_asset/www/index.html”); change to super.loadUrl(“”);

3) Now it will load external website in android application.

Sample code for your reference:

import org.apache.cordova.CordovaActivity;
import android.os.Bundle;

public class RssFeed extends CordovaActivity
public void onCreate(Bundle savedInstanceState)
super.setIntegerProperty("loadUrlTimeoutValue", 70000); // The connection to the server was unsuccessful. URL=, 7000 Milliseconds which equals 7 seconds.
super.setStringProperty("loadingDialog", "Loading…"); // Loading screen until the web page load

Permanent link to this article:

Leave a Reply

Your email address will not be published.