Book Image

Phonegap Essentials

By : Ivan Turkovic
Book Image

Phonegap Essentials

By: Ivan Turkovic

Overview of this book

Table of Contents (15 chapters)


The InAppBrowser plugin allows you to open regular web pages inside your application without the need to open an external browser application. This is useful for opening pages for external authentication with social accounts, or for accessing third-party web pages.

The InAppBrowser is recommended if you need to load third-party (untrusted) content, instead of loading it into the main Cordova WebView. The InAppBrowser is not subject to a whitelist, nor does it open links in the system browser.

To install the plugin, you need to run the following command:

phonegap plugin add org.apache.cordova.inappbrowser

The InAppBrowser window behaves like a regular web browser; thus, it cannot access any PhoneGap native APIs. Inside InAppBrowser, you can only use those HTML5 features that are available for regular web apps; they can provide the same or (similar) behavior. The plugin provides a simple UI with Back, Forward, and Done controls, which can be hidden too:

var ref ="http...