Android Apps

Open links inside the webview – Android Phonegap Configuration

May 20, 2012 by Sarath DR in Android Apps with 1 Comment

Some minor mistakes sometimes eats up our development time. While I was working on Android version of a HTML web app I had to load the web page  in a webview. My problem was that when ever I click on a link in the app it opens in a browser instead of the app web view. I had spent a lot of time to find this minor configuration change.

There is a configuration file in the res/app/xml/cordova.xml

<?xml version="1.0" encoding="utf-8"?>
<cordova>
    <access origin="http://192.168.10.227:8888*"/>
    <access origin="http://127.0.0.1:8888*"/>
    <access origin="http://www.yourdomain.com*"/>
 
    <log level="DEBUG"/>
</cordova>

Share this to

One Comment

  1. netalexApr 10, 2013 at 3:26 pmReply

    for this, there’s the ChildBrowser Plugin, check it out. the default behaviour is to open the browser

Leave a reply

Your email address will not be published. Required fields are marked *

*

About
View Sarath D R's profile on LinkedIn

I am a technology consultant and an entrepreneur focused on the following technologies Java,Spring, Android, Angular, Asterisk, Symfony, Cake , Code-Igniter, Jquery , XAMPP, XHTML, AJAX, MySql, Seo, Web Design, Wordpress, iPhone development.

Today’s Tips
  • Generate Codova.jar file from Phonegap project using ant
  • Google map javascript client  to find the geographic co-ordinates  from  Address or post code
  • Update Android main UI from Webview – Phonegap Plugin
  • Jplayer is not working  with HTC One Android 4.3 version browser
  • Regular expression to validate mobile phone numbers starting with + ( plus ) – php
  • Simple pagination script for PHP
  • Useful adb ( Android Debug Bridge ) commands
  • Change the javascript files url to absolute url – Symfony 1.4
  • Set Http authentication header from Client – PHP / CURL

This site uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.This site also uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.

Close