Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 12e6c992a20d501213c2d1189a1daad49219b6bc @ryanstewart ryanstewart committed Apr 11, 2012
BIN .DS_Store
Binary file not shown.
3 README
@@ -0,0 +1,3 @@
+This example uses the support that PhoneGap Build added for ChildBrowser - https://build.phonegap.com/docs/plugins
+
+For more information on the overall project see - http://blog.digitalbackcountry.com/2012/04/the-phonegap-starter-project/
Binary file not shown.
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+ <widget xmlns = "http://www.w3.org/ns/widgets"
+ xmlns:gap = "http://phonegap.com/ns/1.0"
+ id = "com.digitalbackcountry.example"
+ versionCode="10"
+ version = "1.0.0">
+
+ <name>PhoneGap ChildBrowser Plugin Example</name>
+
+ <description>
+ A starter project for the ChildBrowser plugin
+ </description>
+
+ <author href="https://blog.digitalbackcountry.com" email="ryan@adobe.com">
+ Ryan Stewart
+ </author>
+
+ <preference name="phonegap-version" value="1.5.0" />
+
+ <!-- if a single icon is specified then Build will use it for all platforms -->
+ <icon src="icons/icon.png" />
+
+ <!-- the default attribute can also be used -->
+ <icon src="icons/icon.png" default="true" />
+
+ <!-- specifies the icon to be displayed when hovered over (on BlackBerry) -->
+ <icon src="icons/icon-hover.png" hover="true" />
+
+ <!-- iOS requires specific dimensions for icons; classic iPhone screens, Retina displays, and iPad screens respectively -->
+ <icon src="icons/icon-iphone-57.png" width="57" height="57"/>
+ <icon src="icons/icon-iphone-72.png" width="72" height="72"/>
+ <icon src="icons/icon-iphone-114.png" width="114" height="114"/>
+
+ <!-- Android requires specific dimensions; ldpi, mdpi, and hdpi respectively -->
+ <icon src="icons/icon-android-36.png" width="36" height="36"/>
+ <icon src="icons/icon-android-48.png" width="48" height="48"/>
+ <icon src="icons/icon-android-72.png" width="72" height="72"/>
+
+ <!-- if a single splash screen is specified it will be used for all platforms. Multiple splash screens are recommended for iOS -->
+ <gap:splash src="splashes/splash.png" />
+
+ <!-- iOS requires specific dimensions for different devices; classic iPhone screens, Retina displays, and iPad screens -->
+ <gap:splash src="splashes/splash.png"/>
+ <gap:splash src="splashes/retina.png" width="640" height="960"/>
+ <gap:splash src="splashes/ipad-portrait.png" width="768" height="1004"/>
+ <gap:splash src="splashes/ipad-landscape.png" width="1024" height="748"/>
+
+ <!-- to enable individual plugins use the following example -->
+ <feature name="http://plugins.phonegap.com/ChildBrowser/2.0.0" />
+
+ <!-- This is the whitelist. For ChildBrowser to work correctly you need to enable domains here -->
+ <access origin="google.com" subdomains="true" />
+
+ </widget>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
+ <meta charset="utf-8">
+
+ <link rel="stylesheet" href="style.css" />
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" src="childbrowser.js"></script>
+ <script type="text/javascript">
+ var childbrowser;
+
+ function onBodyLoad() {
+ document.addEventListener("deviceready", onDeviceReady, false);
+
+ }
+
+ function onDeviceReady() {
+ childbrowser = ChildBrowser.install();
+ navigator.notification.alert("Cordova is working");
+ }
+
+ function onLinkClick() {
+
+ if(childbrowser != null)
+ {
+ childbrowser.onLocationChange = function(loc){ alert("In index.html new loc = " + loc); };
+ childbrowser.onClose = function(){alert("In index.html child browser closed");};
+ childbrowser.onOpenExternal = function(){alert("In index.html onOpenExternal");};
+
+ window.plugins.childBrowser.showWebPage("http://google.com");
+
+ }
+ </script>
+ </head>
+ <body onload="onBodyLoad()">
+ <h1>Welcome to the ChildBrowser demo</h1>
+ <p><a href="#" onclick="onLinkClick()">Click here</a> to open a child browser window to Google</p>
+
+ </body>
+</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 12e6c99

Please sign in to comment.