Accessing external website from PhoneGap application

I wanted to create a PhoneGap application, which instead of pointing to a HTML page inside the application should open my blog site these are the steps that i followed to build the application, you can download it from here
  • I followed the instructions in Getting Started with Android to build application that points to index.html inside the application, i tried it once to make sure that it works
  • Then i changed the HelloCordovaActivity like this so that it points to
    package com.webspherenotes.cordova.sample;
    import org.apache.cordova.DroidGap;
    import android.os.Bundle;
    public class HelloCordovaActivity extends DroidGap {
        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) {
    The onCreate() method is calling super.loadUrl(""); so that page is opened in the WebView as soon as application starts
  • The default configuration of the PhoneGap application disallows opening of any external URL so i had to change the cordova.xml like this to allow access to
    <?xml version="1.0" encoding="utf-8"?>
     access elements control the Android whitelist.  
     Domains are assumed blocked unless set otherwise
        <access origin="*"/> <!-- allow local pages -->
     <access origin="" />
     <!-- <access origin="" /> 
     allow any secure requests to -->
     <!-- <access origin="" subdomains="true" /> 
     such as above, but including subdomains, such as www -->
     <!--  <access origin=".*"/>   
     Allow all domains, suggested development use only -->
        <log level="DEBUG"/>
        <preference name="classicRender" value="true" />
    Take a look at XML comments in this file for syntax on how to allow access to external URLs
Now the application is ready and when i launch it i can see my blog being opened like this


Tuấn Hoàng Anh said...

why "" error "Description Resource Path Location Type Attribute is missing the Android namespace prefix"

Bangalore Web Guru said...

I am a regular user of your post, this one also was very interesting and well written. keep sharing the great work Web Design Agency in Bangalore | Website Developers in Bangalore

Jason Borne said...

Nice post and great content.
Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully. We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number

Gmail Customer service is a third party technical support service for Gmail users when they face any technical issue or error in their Gmail account. Our Gmail Customer Support team solves issues like forgot Gmail account password, Gmail configuration or Sync issues, recover deleted emails and many more. Toll Free number (800) 986-9271

How you install or reinstall Office 365 or Office 2016 depends on whether your Office product is part of an Office for home or Office for business plan. If you're not sure what you have, see what office com setup products are included in each plan and then follow the steps for your product. The steps below also apply if you're installing a single, stand-alone Office application such as Access 2016 or Visio 2016. Need Help with office setup Enter Product Key? Call 1-800-000-0000 Toll Free
Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. We offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices. Call our Toll Free number 1 855 966 3855
Other Services
Norton Toll Free , Office-Setup ,

Designpluz said...

Great list. I know many of them, but have now bookmarked several new ones. Thanks!I like This Blog Posting. I Will Recommend This Post to Our Friends.Web Design Sydney, Logo Design Sydney

keerthi dhivi said...

It is really interesting for me to read this article. Thanks for it. I like such topics and everything connected to them.
SEO Experts in Bangalore

Best SEO Company in Bangalore
low cost seo packages

Arif Farooq said...

We help in setting up and Installing Microsoft Office on your computer. We provide Technical Support and other services to you. We help you with great work and other details. We are here to help you. We help you with Microsoft Office and Office installation. We help you with Great technical services at an affordable price.