You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/10/26 20:28:36 UTC

svn commit: r1766733 [14/18] - in /cordova/site/public: ./ announcements/2016/10/ announcements/2016/10/24/ blog/ docs/en/6.x/ docs/en/6.x/config_ref/ docs/en/6.x/cordova/events/ docs/en/6.x/cordova/storage/ docs/en/6.x/guide/appdev/hooks/ docs/en/6.x/...

Modified: cordova/site/public/docs/en/6.x/reference/cordova-plugin-inappbrowser/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-inappbrowser/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-inappbrowser/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-inappbrowser/index.html Wed Oct 26 20:28:35 2016
@@ -6,12 +6,12 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="format-detection" content="telephone=no">
     <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
-    <meta name="description" content=" ">
+    <meta name="description" content="Open an in-app browser window. ">
 
     <title>
         
             
-                cordova-plugin-inappbrowser - Apache Cordova
+                Inappbrowser - Apache Cordova
             
         
     </title>
@@ -747,7 +747,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-                cordova-plugin-battery-status
+                Battery Status
             </a>
             
         
@@ -762,7 +762,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
         
@@ -777,7 +777,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -792,7 +792,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -807,7 +807,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -822,7 +822,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -837,7 +837,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -852,7 +852,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -867,7 +867,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -882,7 +882,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -897,7 +897,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -912,7 +912,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -927,7 +927,7 @@
     <li>
         
             <a class="this-page" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
                 <span class="entry-highlight"></span>
@@ -944,7 +944,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-media/index.html">
-                cordova-plugin-media
+                Media
             </a>
             
         
@@ -959,7 +959,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
-                cordova-plugin-media-capture
+                Media Capture
             </a>
             
         
@@ -974,7 +974,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-                cordova-plugin-network-information
+                Network Information
             </a>
             
         
@@ -989,7 +989,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-                cordova-plugin-splashscreen
+                Splashscreen
             </a>
             
         
@@ -1004,7 +1004,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-                cordova-plugin-vibration
+                Vibration
             </a>
             
         
@@ -1019,7 +1019,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-                cordova-plugin-statusbar
+                Statusbar
             </a>
             
         
@@ -1034,7 +1034,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-                cordova-plugin-whitelist
+                Whitelist
             </a>
             
         
@@ -1049,7 +1049,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-                cordova-plugin-legacy-whitelist
+                Legacy Whitelist
             </a>
             
         
@@ -1412,7 +1412,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-        cordova-plugin-battery-status
+        Battery Status
     </a>
 </li>
 
@@ -1421,7 +1421,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-camera/index.html">
-        cordova-plugin-camera
+        Camera
     </a>
 </li>
 
@@ -1430,7 +1430,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-console/index.html">
-        cordova-plugin-console
+        Console
     </a>
 </li>
 
@@ -1439,7 +1439,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-        cordova-plugin-contacts
+        Contacts
     </a>
 </li>
 
@@ -1448,7 +1448,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device/index.html">
-        cordova-plugin-device
+        Device
     </a>
 </li>
 
@@ -1457,7 +1457,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-        cordova-plugin-device-motion
+        Device Motion
     </a>
 </li>
 
@@ -1466,7 +1466,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-        cordova-plugin-device-orientation
+        Device Orientation
     </a>
 </li>
 
@@ -1475,7 +1475,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-        cordova-plugin-dialogs
+        Dialogs
     </a>
 </li>
 
@@ -1484,7 +1484,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file/index.html">
-        cordova-plugin-file
+        File
     </a>
 </li>
 
@@ -1493,7 +1493,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-        cordova-plugin-file-transfer
+        File Transfer
     </a>
 </li>
 
@@ -1502,7 +1502,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-        cordova-plugin-geolocation
+        Geolocation
     </a>
 </li>
 
@@ -1511,7 +1511,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-        cordova-plugin-globalization
+        Globalization
     </a>
 </li>
 
@@ -1520,7 +1520,7 @@
 
 <li>
     <a class="this-page" href="../../reference/cordova-plugin-inappbrowser/index.html">
-        cordova-plugin-inappbrowser
+        Inappbrowser
     </a>
 </li>
 
@@ -1529,7 +1529,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-media/index.html">
-        cordova-plugin-media
+        Media
     </a>
 </li>
 
@@ -1538,7 +1538,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
-        cordova-plugin-media-capture
+        Media Capture
     </a>
 </li>
 
@@ -1547,7 +1547,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-        cordova-plugin-network-information
+        Network Information
     </a>
 </li>
 
@@ -1556,7 +1556,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-        cordova-plugin-splashscreen
+        Splashscreen
     </a>
 </li>
 
@@ -1565,7 +1565,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-        cordova-plugin-vibration
+        Vibration
     </a>
 </li>
 
@@ -1574,7 +1574,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-        cordova-plugin-statusbar
+        Statusbar
     </a>
 </li>
 
@@ -1583,7 +1583,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-        cordova-plugin-whitelist
+        Whitelist
     </a>
 </li>
 
@@ -1592,7 +1592,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-        cordova-plugin-legacy-whitelist
+        Legacy Whitelist
     </a>
 </li>
 
@@ -2704,10 +2704,34 @@
 #         under the License.
 -->
 
-<p><a href="https://travis-ci.org/apache/cordova-plugin-inappbrowser"><img src="https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master" alt="Build Status"></a></p>
+<table><thead>
+<tr>
+<th style="text-align: center">Android</th>
+<th style="text-align: center">iOS</th>
+<th style="text-align: center">Windows 8.1 Store</th>
+<th style="text-align: center">Windows 8.1 Phone</th>
+<th style="text-align: center">Windows 10 Store</th>
+<th style="text-align: center">Travis CI</th>
+</tr>
+</thead><tbody>
+<tr>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-inappbrowser/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-inappbrowser" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-inappbrowser/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-inappbrowser" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-inappbrowser/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-inappbrowser" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-inappbrowser/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-inappbrowser" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-inappbrowser" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="https://travis-ci.org/apache/cordova-plugin-inappbrowser"><img src="https://travis-ci.org/apache/cordova-plugin-inappbrowser.svg?branch=master" alt="Build Status"></a></td>
+</tr>
+</tbody></table>
 
 <h1>cordova-plugin-inappbrowser</h1>
 
+<p>You can show helpful articles, videos, and web resources inside of your app. Users can view web pages without leaving your app.</p>
+
+<blockquote>
+<p>To get a few ideas, check out the <a href="#sample">sample</a> at the bottom of this page or go straight to the <a href="#reference">reference</a> content.</p>
+</blockquote>
+
 <p>This plugin provides a web browser view that displays when calling <code>cordova.InAppBrowser.open()</code>.</p>
 <div class="highlight"><pre><code class="language-" data-lang="">var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
 </code></pre></div>
@@ -2741,6 +2765,8 @@ function onDeviceReady() {
 </code></pre></div>
 <p>Report issues with this plugin on the <a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20InAppBrowser%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC">Apache Cordova issue tracker</a></p>
 
+<h2><a id="reference">Reference</a></h2>
+
 <h2>Installation</h2>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-inappbrowser
 </code></pre></div>
@@ -2758,7 +2784,7 @@ instance, or the system browser.</p>
 <div class="highlight"><pre><code class="language-" data-lang="">var ref = cordova.InAppBrowser.open(url, target, options);
 </code></pre></div>
 <ul>
-<li><p><strong>ref</strong>: Reference to the <code>InAppBrowser</code> window. <em>(InAppBrowser)</em></p></li>
+<li><p><strong>ref</strong>: Reference to the <code>InAppBrowser</code> window when the target is set to <code>&#39;_blank&#39;</code>. <em>(InAppBrowser)</em></p></li>
 <li><p><strong>url</strong>: The URL to load <em>(String)</em>. Call <code>encodeURI()</code> on this if the URL contains Unicode characters.</p></li>
 <li><p><strong>target</strong>: The target in which to load the URL, an optional parameter that defaults to <code>_self</code>. <em>(String)</em></p>
 
@@ -2784,6 +2810,7 @@ instance, or the system browser.</p>
 <li><strong>zoom</strong>: set to <code>yes</code> to show Android browser&#39;s zoom controls, set to <code>no</code> to hide them.  Default value is <code>yes</code>.</li>
 <li><strong>hardwareback</strong>: set to <code>yes</code> to use the hardware back button to navigate backwards through the <code>InAppBrowser</code>&#39;s history. If there is no previous page, the <code>InAppBrowser</code> will close.  The default value is <code>yes</code>, so you must set it to <code>no</code> if you want the back button to simply close the InAppBrowser.</li>
 <li><strong>mediaPlaybackRequiresUserAction</strong>: Set to <code>yes</code> to prevent HTML5 audio or video from autoplaying (defaults to <code>no</code>).</li>
+<li><strong>shouldPauseOnSuspend</strong>: Set to <code>yes</code> to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in <a href="https://issues.apache.org/jira/browse/CB-11013">CB-11013</a>).</li>
 </ul>
 
 <p>iOS only:</p>
@@ -2810,6 +2837,7 @@ instance, or the system browser.</p>
 <ul>
 <li><strong>hidden</strong>: set to <code>yes</code> to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to <code>no</code> (default) to have the browser open and load normally.</li>
 <li><strong>fullscreen</strong>: set to <code>yes</code> to create the browser control without a border around it. Please note that if <strong>location=no</strong> is also specified, there will be no control presented to user to close IAB window.</li>
+<li><strong>hardwareback</strong>: works the same way as on Android platform.</li>
 </ul></li>
 </ul>
 
@@ -2821,6 +2849,7 @@ instance, or the system browser.</p>
 <li>BlackBerry 10</li>
 <li>Firefox OS</li>
 <li>iOS</li>
+<li>OSX</li>
 <li>Windows 8 and 8.1</li>
 <li>Windows Phone 7 and 8</li>
 <li>Browser</li>
@@ -2858,6 +2887,12 @@ opened with <code>target=&#39;_blank&#39
     <span class="nl">color</span><span class="p">:</span> <span class="m">#777</span><span class="p">;</span>
 <span class="p">}</span>
 </code></pre></div>
+<h3>OSX Quirks</h3>
+
+<p>At the moment the only supported target in OSX is <code>_system</code>.</p>
+
+<p><code>_blank</code> and <code>_self</code> targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated.</p>
+
 <h3>Windows Quirks</h3>
 
 <p>Windows 8.0, 8.1 and Windows Phone 8.1 don&#39;t support remote urls to be opened in the Cordova WebView so remote urls are always showed in the system&#39;s web browser if opened with <code>target=&#39;_self&#39;</code>.</p>
@@ -2875,7 +2910,7 @@ opened with <code>target=&#39;_blank&#39
 
 <h2>InAppBrowser</h2>
 
-<p>The object returned from a call to <code>cordova.InAppBrowser.open</code>.</p>
+<p>The object returned from a call to <code>cordova.InAppBrowser.open</code> when the target is set to <code>&#39;_blank&#39;</code>.</p>
 
 <h3>Methods</h3>
 
@@ -2884,6 +2919,7 @@ opened with <code>target=&#39;_blank&#39
 <li>removeEventListener</li>
 <li>close</li>
 <li>show</li>
+<li>hide</li>
 <li>executeScript</li>
 <li>insertCSS</li>
 </ul>
@@ -2908,6 +2944,73 @@ opened with <code>target=&#39;_blank&#39
 <li><p><strong>callback</strong>: the function that executes when the event fires. The function is passed an <code>InAppBrowserEvent</code> object as a parameter.</p></li>
 </ul>
 
+<h2>Example</h2>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="kd">var</span> <span class="nx">inAppBrowserRef</span><span class="p">;</span>
+
+<span class="kd">function</span> <span class="nx">showHelp</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">target</span> <span class="o">=</span> <span class="s2">"_blank"</span><span class="p">;</span>
+
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="s2">"location=yes,hidden=yes"</span><span class="p">;</span>
+
+    <span class="nx">inAppBrowserRef</span> <span class="o">=</span> <span class="nx">cordova</span><span class="p">.</span><span class="nx">InAppBrowser</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="nx">target</span><span class="p">,</span> <span class="nx">options</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loadstart'</span><span class="p">,</span> <span class="nx">loadStartCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loadstop'</span><span class="p">,</span> <span class="nx">loadStopCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loaderror'</span><span class="p">,</span> <span class="nx">loadErrorCallBack</span><span class="p">);</span>
+
+<span class="p">}</span>
+
+<span class="kd">function</span> <span class="nx">loadStartCallBack</span><span class="p">()</span> <span class="p">{</span>
+
+    <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">"loading please wait ..."</span><span class="p">);</span>
+
+<span class="p">}</span>
+
+<span class="kd">function</span> <span class="nx">loadStopCallBack</span><span class="p">()</span> <span class="p">{</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">inAppBrowserRef</span> <span class="o">!=</span> <span class="kc">undefined</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">insertCSS</span><span class="p">({</span> <span class="na">code</span><span class="p">:</span> <span class="s2">"body{font-size: 25px;"</span> <span class="p">});</span>
+
+        <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">""</span><span class="p">);</span>
+
+        <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">show</span><span class="p">();</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+
+<span class="kd">function</span> <span class="nx">loadErrorCallBack</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">""</span><span class="p">);</span>
+
+    <span class="kd">var</span> <span class="nx">scriptErrorMesssage</span> <span class="o">=</span>
+       <span class="s2">"alert('Sorry we cannot open that page. Message from the server is : "</span>
+       <span class="o">+</span> <span class="nx">params</span><span class="p">.</span><span class="nx">message</span> <span class="o">+</span> <span class="s2">"');"</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">executeScript</span><span class="p">({</span> <span class="na">code</span><span class="p">:</span> <span class="nx">scriptErrorMesssage</span> <span class="p">},</span> <span class="nx">executeScriptCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
+
+    <span class="nx">inAppBrowserRef</span> <span class="o">=</span> <span class="kc">undefined</span><span class="p">;</span>
+
+<span class="p">}</span>
+
+<span class="kd">function</span> <span class="nx">executeScriptCallBack</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">params</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span>
+           <span class="s2">"Sorry we couldn't open that page. Message from the server is : '"</span>
+           <span class="o">+</span> <span class="nx">params</span><span class="p">.</span><span class="nx">message</span> <span class="o">+</span> <span class="s2">"'"</span><span class="p">);</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+
+</code></pre></div>
 <h3>InAppBrowserEvent Properties</h3>
 
 <ul>
@@ -3027,6 +3130,31 @@ ref.close();
 // some time later...
 ref.show();
 </code></pre></div>
+<h2>InAppBrowser.hide</h2>
+
+<blockquote>
+<p>Hides the InAppBrowser window. Calling this has no effect if the InAppBrowser was already hidden.</p>
+</blockquote>
+<div class="highlight"><pre><code class="language-" data-lang="">ref.hide();
+</code></pre></div>
+<ul>
+<li><strong>ref</strong>: reference to the InAppBrowser window (<code>InAppBrowser</code>)</li>
+</ul>
+
+<h3>Supported Platforms</h3>
+
+<ul>
+<li>Amazon Fire OS</li>
+<li>Android</li>
+<li>iOS</li>
+<li>Windows 8 and 8.1</li>
+</ul>
+
+<h3>Quick Example</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">var ref = cordova.InAppBrowser.open('http://apache.org', '_blank');
+// some time later...
+ref.hide();
+</code></pre></div>
 <h2>InAppBrowser.executeScript</h2>
 
 <blockquote>
@@ -3112,6 +3240,183 @@ ref.addEventListener('loadstop', functio
     ref.insertCSS({file: "mystyles.css"});
 });
 </code></pre></div>
+<p>__</p>
+
+<h2><a id="sample"></a>Sample: Show help pages with an InAppBrowser</h2>
+
+<p>You can use this plugin to show helpful documentation pages within your app. Users can view online help documents and then close them without leaving the app.</p>
+
+<p>Here&#39;s a few snippets that show how you do this.</p>
+
+<ul>
+<li><a href="#give">Give users a way to ask for help</a>.</li>
+<li><a href="#load">Load a help page</a>.</li>
+<li><a href="#let">Let users know that you&#39;re getting their page ready</a>.</li>
+<li><a href="#show">Show the help page</a>.</li>
+<li><a href="#handle">Handle page errors</a>.</li>
+</ul>
+
+<h3><a id="give"></a>Give users a way to ask for help</h3>
+
+<p>There&#39;s lots of ways to do this in your app. A drop down list is a simple way to do that.</p>
+<div class="highlight"><pre><code class="language-html" data-lang="html">
+<span class="nt">&lt;select</span> <span class="na">id=</span><span class="s">"help-select"</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;option</span> <span class="na">value=</span><span class="s">"default"</span><span class="nt">&gt;</span>Need help?<span class="nt">&lt;/option&gt;</span>
+    <span class="nt">&lt;option</span> <span class="na">value=</span><span class="s">"article"</span><span class="nt">&gt;</span>Show me a helpful article<span class="nt">&lt;/option&gt;</span>
+    <span class="nt">&lt;option</span> <span class="na">value=</span><span class="s">"video"</span><span class="nt">&gt;</span>Show me a helpful video<span class="nt">&lt;/option&gt;</span>
+    <span class="nt">&lt;option</span> <span class="na">value=</span><span class="s">"search"</span><span class="nt">&gt;</span>Search for other topics<span class="nt">&lt;/option&gt;</span>
+<span class="nt">&lt;/select&gt;</span>
+
+</code></pre></div>
+<p>Gather the users choice in the <code>onDeviceReady</code> function of the page and then send an appropriate URL to a helper function in some shared library file. Our helper function is named <code>showHelp()</code> and we&#39;ll write that function next.</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="nx">$</span><span class="p">(</span><span class="s1">'#help-select'</span><span class="p">).</span><span class="nx">on</span><span class="p">(</span><span class="s1">'change'</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">url</span><span class="p">;</span>
+
+    <span class="k">switch</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">value</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="k">case</span> <span class="s2">"article"</span><span class="err">:</span>
+            <span class="nx">url</span> <span class="o">=</span> <span class="s2">"https://cordova.apache.org/docs/en/latest/"</span>
+                        <span class="o">+</span> <span class="s2">"reference/cordova-plugin-inappbrowser/index.html"</span><span class="p">;</span>
+            <span class="k">break</span><span class="p">;</span>
+
+        <span class="k">case</span> <span class="s2">"video"</span><span class="err">:</span>
+            <span class="nx">url</span> <span class="o">=</span> <span class="s2">"https://youtu.be/F-GlVrTaeH0"</span><span class="p">;</span>
+            <span class="k">break</span><span class="p">;</span>
+
+        <span class="k">case</span> <span class="s2">"search"</span><span class="err">:</span>
+            <span class="nx">url</span> <span class="o">=</span> <span class="s2">"https://www.google.com/#q=inAppBrowser+plugin"</span><span class="p">;</span>
+            <span class="k">break</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="nx">showHelp</span><span class="p">(</span><span class="nx">url</span><span class="p">);</span>
+
+<span class="p">});</span>
+
+</code></pre></div>
+<h3><a id="load"></a>Load a help page</h3>
+
+<p>We&#39;ll use the <code>open</code> function to load the help page. We&#39;re setting the <code>hidden</code> property to <code>yes</code> so that we can show the browser only after the page content has loaded. That way, users don&#39;t see a blank browser while they wait for content to appear. When the <code>loadstop</code> event is raised, we&#39;ll know when the content has loaded. We&#39;ll handle that event shortly.</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="kd">function</span> <span class="nx">showHelp</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">target</span> <span class="o">=</span> <span class="s2">"_blank"</span><span class="p">;</span>
+
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="s2">"location=yes,hidden=yes"</span><span class="p">;</span>
+
+    <span class="nx">inAppBrowserRef</span> <span class="o">=</span> <span class="nx">cordova</span><span class="p">.</span><span class="nx">InAppBrowser</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="nx">target</span><span class="p">,</span> <span class="nx">options</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loadstart'</span><span class="p">,</span> <span class="nx">loadStartCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loadstop'</span><span class="p">,</span> <span class="nx">loadStopCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'loaderror'</span><span class="p">,</span> <span class="nx">loadErrorCallBack</span><span class="p">);</span>
+
+<span class="p">}</span>
+
+</code></pre></div>
+<h3><a id="let"></a>Let users know that you&#39;re getting their page ready</h3>
+
+<p>Because the browser doesn&#39;t immediately appear, we can use the <code>loadstart</code> event to show a status message, progress bar, or other indicator. This assures users that content is on the way.</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="kd">function</span> <span class="nx">loadStartCallBack</span><span class="p">()</span> <span class="p">{</span>
+
+    <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">"loading please wait ..."</span><span class="p">);</span>
+
+<span class="p">}</span>
+
+</code></pre></div>
+<h3><a id="show"></a>Show the help page</h3>
+
+<p>When the <code>loadstopcallback</code> event is raised, we know that the content has loaded and we can make the browser visible. This sort of trick can create the impression of better performance. The truth is that whether you show the browser before content loads or not, the load times are exactly the same.</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="kd">function</span> <span class="nx">loadStopCallBack</span><span class="p">()</span> <span class="p">{</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">inAppBrowserRef</span> <span class="o">!=</span> <span class="kc">undefined</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">insertCSS</span><span class="p">({</span> <span class="na">code</span><span class="p">:</span> <span class="s2">"body{font-size: 25px;"</span> <span class="p">});</span>
+
+        <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">""</span><span class="p">);</span>
+
+        <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">show</span><span class="p">();</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+
+</code></pre></div>
+<p>You might have noticed the call to the <code>insertCSS</code> function. This serves no particular purpose in our scenario. But it gives you an idea of why you might use it. In this case, we&#39;re just making sure that the font size of your pages have a certain size. You can use this function to insert any CSS style elements. You can even point to a CSS file in your project.</p>
+
+<h3><a id="handle"></a>Handle page errors</h3>
+
+<p>Sometimes a page no longer exists, a script error occurs, or a user lacks permission to view the resource. How or if you handle that situation is completely up to you and your design. You can let the browser show that message or you can present it in another way.</p>
+
+<p>We&#39;ll try to show that error in a message box. We can do that by injecting a script that calls the <code>alert</code> function. That said, this won&#39;t work in browsers on Windows devices so we&#39;ll have to look at the parameter of the <code>executeScript</code> callback function to see if our attempt worked. If it didn&#39;t work out for us, we&#39;ll just show the error message in a <code>&lt;div&gt;</code> on the page.</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript">
+<span class="kd">function</span> <span class="nx">loadErrorCallBack</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span><span class="s2">""</span><span class="p">);</span>
+
+    <span class="kd">var</span> <span class="nx">scriptErrorMesssage</span> <span class="o">=</span>
+       <span class="s2">"alert('Sorry we cannot open that page. Message from the server is : "</span>
+       <span class="o">+</span> <span class="nx">params</span><span class="p">.</span><span class="nx">message</span> <span class="o">+</span> <span class="s2">"');"</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">executeScript</span><span class="p">({</span> <span class="na">code</span><span class="p">:</span> <span class="nx">scriptErrorMesssage</span> <span class="p">},</span> <span class="nx">executeScriptCallBack</span><span class="p">);</span>
+
+    <span class="nx">inAppBrowserRef</span><span class="p">.</span><span class="nx">close</span><span class="p">();</span>
+
+    <span class="nx">inAppBrowserRef</span> <span class="o">=</span> <span class="kc">undefined</span><span class="p">;</span>
+
+<span class="p">}</span>
+
+<span class="kd">function</span> <span class="nx">executeScriptCallBack</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">params</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="nx">$</span><span class="p">(</span><span class="s1">'#status-message'</span><span class="p">).</span><span class="nx">text</span><span class="p">(</span>
+           <span class="s2">"Sorry we couldn't open that page. Message from the server is : '"</span>
+           <span class="o">+</span> <span class="nx">params</span><span class="p">.</span><span class="nx">message</span> <span class="o">+</span> <span class="s2">"'"</span><span class="p">);</span>
+    <span class="p">}</span>
+
+<span class="p">}</span>
+
+</code></pre></div>
+<h2>More Usage Info</h2>
+
+<h3>Local Urls ( source is in the app package )</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">var iab = cordova.InAppBrowser;
+
+iab.open('local-url.html');                  // loads in the Cordova WebView
+iab.open('local-url.html', '_self');         // loads in the Cordova WebView
+iab.open('local-url.html', '_system');       // Security error: system browser, but url will not load (iOS)
+iab.open('local-url.html', '_blank');        // loads in the InAppBrowser
+iab.open('local-url.html', 'random_string'); // loads in the InAppBrowser
+iab.open('local-url.html', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
+
+</code></pre></div>
+<h3>Whitelisted Content</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">var iab = cordova.InAppBrowser;
+
+iab.open('http://whitelisted-url.com');                  // loads in the Cordova WebView
+iab.open('http://whitelisted-url.com', '_self');         // loads in the Cordova WebView
+iab.open('http://whitelisted-url.com', '_system');       // loads in the system browser
+iab.open('http://whitelisted-url.com', '_blank');        // loads in the InAppBrowser
+iab.open('http://whitelisted-url.com', 'random_string'); // loads in the InAppBrowser
+
+iab.open('http://whitelisted-url.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
+
+</code></pre></div>
+<h3>Urls that are not white-listed</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">var iab = cordova.InAppBrowser;
+
+iab.open('http://url-that-fails-whitelist.com');                  // loads in the InAppBrowser
+iab.open('http://url-that-fails-whitelist.com', '_self');         // loads in the InAppBrowser
+iab.open('http://url-that-fails-whitelist.com', '_system');       // loads in the system browser
+iab.open('http://url-that-fails-whitelist.com', '_blank');        // loads in the InAppBrowser
+iab.open('http://url-that-fails-whitelist.com', 'random_string'); // loads in the InAppBrowser
+iab.open('http://url-that-fails-whitelist.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
+
+</code></pre></div>
 
                 </div>
             </div>

Modified: cordova/site/public/docs/en/6.x/reference/cordova-plugin-legacy-whitelist/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-legacy-whitelist/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-legacy-whitelist/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-legacy-whitelist/index.html Wed Oct 26 20:28:35 2016
@@ -6,12 +6,12 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="format-detection" content="telephone=no">
     <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
-    <meta name="description" content=" ">
+    <meta name="description" content="Legacy implementation of the whitelist plugin. ">
 
     <title>
         
             
-                cordova-plugin-legacy-whitelist - Apache Cordova
+                Legacy Whitelist - Apache Cordova
             
         
     </title>
@@ -747,7 +747,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-                cordova-plugin-battery-status
+                Battery Status
             </a>
             
         
@@ -762,7 +762,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
         
@@ -777,7 +777,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -792,7 +792,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -807,7 +807,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -822,7 +822,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -837,7 +837,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -852,7 +852,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -867,7 +867,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -882,7 +882,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -897,7 +897,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -912,7 +912,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -927,7 +927,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
         
@@ -942,7 +942,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-media/index.html">
-                cordova-plugin-media
+                Media
             </a>
             
         
@@ -957,7 +957,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
-                cordova-plugin-media-capture
+                Media Capture
             </a>
             
         
@@ -972,7 +972,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-                cordova-plugin-network-information
+                Network Information
             </a>
             
         
@@ -987,7 +987,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-                cordova-plugin-splashscreen
+                Splashscreen
             </a>
             
         
@@ -1002,7 +1002,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-                cordova-plugin-vibration
+                Vibration
             </a>
             
         
@@ -1017,7 +1017,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-                cordova-plugin-statusbar
+                Statusbar
             </a>
             
         
@@ -1032,7 +1032,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-                cordova-plugin-whitelist
+                Whitelist
             </a>
             
         
@@ -1047,7 +1047,7 @@
     <li>
         
             <a class="this-page" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-                cordova-plugin-legacy-whitelist
+                Legacy Whitelist
             </a>
             
                 <span class="entry-highlight"></span>
@@ -1412,7 +1412,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-        cordova-plugin-battery-status
+        Battery Status
     </a>
 </li>
 
@@ -1421,7 +1421,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-camera/index.html">
-        cordova-plugin-camera
+        Camera
     </a>
 </li>
 
@@ -1430,7 +1430,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-console/index.html">
-        cordova-plugin-console
+        Console
     </a>
 </li>
 
@@ -1439,7 +1439,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-        cordova-plugin-contacts
+        Contacts
     </a>
 </li>
 
@@ -1448,7 +1448,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device/index.html">
-        cordova-plugin-device
+        Device
     </a>
 </li>
 
@@ -1457,7 +1457,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-        cordova-plugin-device-motion
+        Device Motion
     </a>
 </li>
 
@@ -1466,7 +1466,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-        cordova-plugin-device-orientation
+        Device Orientation
     </a>
 </li>
 
@@ -1475,7 +1475,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-        cordova-plugin-dialogs
+        Dialogs
     </a>
 </li>
 
@@ -1484,7 +1484,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file/index.html">
-        cordova-plugin-file
+        File
     </a>
 </li>
 
@@ -1493,7 +1493,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-        cordova-plugin-file-transfer
+        File Transfer
     </a>
 </li>
 
@@ -1502,7 +1502,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-        cordova-plugin-geolocation
+        Geolocation
     </a>
 </li>
 
@@ -1511,7 +1511,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-        cordova-plugin-globalization
+        Globalization
     </a>
 </li>
 
@@ -1520,7 +1520,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-        cordova-plugin-inappbrowser
+        Inappbrowser
     </a>
 </li>
 
@@ -1529,7 +1529,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-media/index.html">
-        cordova-plugin-media
+        Media
     </a>
 </li>
 
@@ -1538,7 +1538,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-media-capture/index.html">
-        cordova-plugin-media-capture
+        Media Capture
     </a>
 </li>
 
@@ -1547,7 +1547,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-        cordova-plugin-network-information
+        Network Information
     </a>
 </li>
 
@@ -1556,7 +1556,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-        cordova-plugin-splashscreen
+        Splashscreen
     </a>
 </li>
 
@@ -1565,7 +1565,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-        cordova-plugin-vibration
+        Vibration
     </a>
 </li>
 
@@ -1574,7 +1574,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-        cordova-plugin-statusbar
+        Statusbar
     </a>
 </li>
 
@@ -1583,7 +1583,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-        cordova-plugin-whitelist
+        Whitelist
     </a>
 </li>
 
@@ -1592,7 +1592,7 @@
 
 <li>
     <a class="this-page" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-        cordova-plugin-legacy-whitelist
+        Legacy Whitelist
     </a>
 </li>
 

Modified: cordova/site/public/docs/en/6.x/reference/cordova-plugin-media-capture/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-media-capture/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-media-capture/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-media-capture/index.html Wed Oct 26 20:28:35 2016
@@ -6,12 +6,12 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="format-detection" content="telephone=no">
     <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
-    <meta name="description" content=" ">
+    <meta name="description" content="Capture audio, video, and images. ">
 
     <title>
         
             
-                cordova-plugin-media-capture - Apache Cordova
+                Media Capture - Apache Cordova
             
         
     </title>
@@ -747,7 +747,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-                cordova-plugin-battery-status
+                Battery Status
             </a>
             
         
@@ -762,7 +762,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
         
@@ -777,7 +777,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -792,7 +792,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -807,7 +807,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -822,7 +822,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -837,7 +837,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -852,7 +852,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -867,7 +867,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -882,7 +882,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -897,7 +897,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -912,7 +912,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -927,7 +927,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
         
@@ -942,7 +942,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-media/index.html">
-                cordova-plugin-media
+                Media
             </a>
             
         
@@ -957,7 +957,7 @@
     <li>
         
             <a class="this-page" href="../../reference/cordova-plugin-media-capture/index.html">
-                cordova-plugin-media-capture
+                Media Capture
             </a>
             
                 <span class="entry-highlight"></span>
@@ -974,7 +974,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-                cordova-plugin-network-information
+                Network Information
             </a>
             
         
@@ -989,7 +989,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-                cordova-plugin-splashscreen
+                Splashscreen
             </a>
             
         
@@ -1004,7 +1004,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-                cordova-plugin-vibration
+                Vibration
             </a>
             
         
@@ -1019,7 +1019,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-                cordova-plugin-statusbar
+                Statusbar
             </a>
             
         
@@ -1034,7 +1034,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-                cordova-plugin-whitelist
+                Whitelist
             </a>
             
         
@@ -1049,7 +1049,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-                cordova-plugin-legacy-whitelist
+                Legacy Whitelist
             </a>
             
         
@@ -1412,7 +1412,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-        cordova-plugin-battery-status
+        Battery Status
     </a>
 </li>
 
@@ -1421,7 +1421,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-camera/index.html">
-        cordova-plugin-camera
+        Camera
     </a>
 </li>
 
@@ -1430,7 +1430,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-console/index.html">
-        cordova-plugin-console
+        Console
     </a>
 </li>
 
@@ -1439,7 +1439,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-        cordova-plugin-contacts
+        Contacts
     </a>
 </li>
 
@@ -1448,7 +1448,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device/index.html">
-        cordova-plugin-device
+        Device
     </a>
 </li>
 
@@ -1457,7 +1457,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-        cordova-plugin-device-motion
+        Device Motion
     </a>
 </li>
 
@@ -1466,7 +1466,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-        cordova-plugin-device-orientation
+        Device Orientation
     </a>
 </li>
 
@@ -1475,7 +1475,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-        cordova-plugin-dialogs
+        Dialogs
     </a>
 </li>
 
@@ -1484,7 +1484,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file/index.html">
-        cordova-plugin-file
+        File
     </a>
 </li>
 
@@ -1493,7 +1493,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-        cordova-plugin-file-transfer
+        File Transfer
     </a>
 </li>
 
@@ -1502,7 +1502,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-        cordova-plugin-geolocation
+        Geolocation
     </a>
 </li>
 
@@ -1511,7 +1511,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-        cordova-plugin-globalization
+        Globalization
     </a>
 </li>
 
@@ -1520,7 +1520,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-        cordova-plugin-inappbrowser
+        Inappbrowser
     </a>
 </li>
 
@@ -1529,7 +1529,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-media/index.html">
-        cordova-plugin-media
+        Media
     </a>
 </li>
 
@@ -1538,7 +1538,7 @@
 
 <li>
     <a class="this-page" href="../../reference/cordova-plugin-media-capture/index.html">
-        cordova-plugin-media-capture
+        Media Capture
     </a>
 </li>
 
@@ -1547,7 +1547,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-network-information/index.html">
-        cordova-plugin-network-information
+        Network Information
     </a>
 </li>
 
@@ -1556,7 +1556,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-splashscreen/index.html">
-        cordova-plugin-splashscreen
+        Splashscreen
     </a>
 </li>
 
@@ -1565,7 +1565,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-vibration/index.html">
-        cordova-plugin-vibration
+        Vibration
     </a>
 </li>
 
@@ -1574,7 +1574,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-statusbar/index.html">
-        cordova-plugin-statusbar
+        Statusbar
     </a>
 </li>
 
@@ -1583,7 +1583,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-whitelist/index.html">
-        cordova-plugin-whitelist
+        Whitelist
     </a>
 </li>
 
@@ -1592,7 +1592,7 @@
 
 <li>
     <a class="" href="../../reference/cordova-plugin-legacy-whitelist/index.html">
-        cordova-plugin-legacy-whitelist
+        Legacy Whitelist
     </a>
 </li>
 
@@ -2704,7 +2704,25 @@
 #         under the License.
 -->
 
-<p><a href="https://travis-ci.org/apache/cordova-plugin-media-capture"><img src="https://travis-ci.org/apache/cordova-plugin-media-capture.svg?branch=master" alt="Build Status"></a></p>
+<table><thead>
+<tr>
+<th style="text-align: center">Android</th>
+<th style="text-align: center">iOS</th>
+<th style="text-align: center">Windows 8.1 Store</th>
+<th style="text-align: center">Windows 8.1 Phone</th>
+<th style="text-align: center">Windows 10 Store</th>
+<th style="text-align: center">Travis CI</th>
+</tr>
+</thead><tbody>
+<tr>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-media-capture/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-media-capture" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-media-capture/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-media-capture" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-media-capture/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-media-capture" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-media-capture/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-media-capture" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-media-capture/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-media-capture" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="https://travis-ci.org/apache/cordova-plugin-media-capture"><img src="https://travis-ci.org/apache/cordova-plugin-media-capture.svg?branch=master" alt="Build Status"></a></td>
+</tr>
+</tbody></table>
 
 <h1>cordova-plugin-media-capture</h1>
 
@@ -2892,6 +2910,33 @@ object featuring a <code>CaptureError.CA
 <li>Windows</li>
 </ul>
 
+<h3>iOS Quirks</h3>
+
+<p>Since iOS 10 it&#39;s mandatory to add a <code>NSCameraUsageDescription</code>, <code>NSMicrophoneUsageDescription</code> and <code>NSPhotoLibraryUsageDescriptionentry</code> in the info.plist.</p>
+
+<ul>
+<li><code>NSCameraUsageDescription</code> describes the reason that the app accesses the user’s camera.</li>
+<li><code>NSMicrophoneUsageDescription</code> describes the reason that the app accesses the user’s microphone.</li>
+<li><code>NSPhotoLibraryUsageDescriptionentry</code> describes the reason the app accesses the user&#39;s photo library.</li>
+</ul>
+
+<p>When the system prompts the user to allow access, this string is displayed as part of the dialog box.</p>
+
+<p>To add this entry you can pass the following variables on plugin install.</p>
+
+<ul>
+<li><code>CAMERA_USAGE_DESCRIPTION</code> for <code>NSCameraUsageDescription</code></li>
+<li><code>MICROPHONE_USAGE_DESCRIPTION</code> for <code>NSMicrophoneUsageDescription</code></li>
+<li><code>PHOTOLIBRARY_USAGE_DESCRIPTION</code> for <code>NSPhotoLibraryUsageDescriptionentry</code></li>
+</ul>
+
+<p>-
+Example:</p>
+
+<p><code>cordova plugin add cordova-plugin-media-capture --variable CAMERA_USAGE_DESCRIPTION=&quot;your usage message&quot;</code></p>
+
+<p>If you don&#39;t pass the variable, the plugin will add an empty string as value.</p>
+
 <h3>Windows Phone 7 Quirks</h3>
 
 <p>Invoking the native camera application while your device is connected
@@ -3144,6 +3189,7 @@ function captureSuccess(mediaFiles) {
 <li><p><code>CaptureError.CAPTURE_APPLICATION_BUSY</code>: The camera or audio capture application is currently serving another capture request.</p></li>
 <li><p><code>CaptureError.CAPTURE_INVALID_ARGUMENT</code>: Invalid use of the API (e.g., the value of <code>limit</code> is less than one).</p></li>
 <li><p><code>CaptureError.CAPTURE_NO_MEDIA_FILES</code>: The user exits the camera or audio capture application before capturing anything.</p></li>
+<li><p><code>CaptureError.CAPTURE_PERMISSION_DENIED</code>: The user denied a permission required to perform the given capture request.</p></li>
 <li><p><code>CaptureError.CAPTURE_NOT_SUPPORTED</code>: The requested capture operation is not supported.</p></li>
 </ul>
 
@@ -3354,6 +3400,37 @@ the following default values:</p>
 <li><p><strong>duration</strong>: Supported: audio and video files only.</p></li>
 </ul>
 
+<h2>Android Lifecycle Quirks</h2>
+
+<p>When capturing audio, video, or images on the Android platform, there is a chance that the
+application will get destroyed after the Cordova Webview is pushed to the background by
+the native capture application. See the <a href="http://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#lifecycle-guide">Android Lifecycle Guide</a> for
+a full description of the issue. In this case, the success and failure callbacks passed
+to the capture method will not be fired and instead the results of the call will be
+delivered via a document event that fires after the Cordova <a href="http://cordova.apache.org/docs/en/latest/cordova/events/events.html#resume">resume event</a>.</p>
+
+<p>In your app, you should subscribe to the two possible events like so:</p>
+<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="kd">function</span> <span class="nx">onDeviceReady</span><span class="p">()</span> <span class="p">{</span>
+    <span class="c1">// pendingcaptureresult is fired if the capture call is successful</span>
+    <span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'pendingcaptureresult'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">mediaFiles</span><span class="p">)</span> <span class="p">{</span>
+        <span class="c1">// Do something with result</span>
+    <span class="p">});</span>
+
+    <span class="c1">// pendingcaptureerror is fired if the capture call is unsuccessful</span>
+    <span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'pendingcaptureerror'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
+        <span class="c1">// Handle error case</span>
+    <span class="p">});</span>
+<span class="p">}</span>
+
+<span class="c1">// Only subscribe to events after deviceready fires</span>
+<span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'deviceready'</span><span class="p">,</span> <span class="nx">onDeviceReady</span><span class="p">);</span>
+</code></pre></div>
+<p>It is up you to track what part of your code these results are coming from. Be sure to
+save and restore your app&#39;s state as part of the <a href="http://cordova.apache.org/docs/en/latest/cordova/events/events.html#pause">pause</a> and
+<a href="http://cordova.apache.org/docs/en/latest/cordova/events/events.html#resume">resume</a> events as appropriate. Please note that these events will only
+fire on the Android platform and only when the Webview was destroyed during a capture
+operation.</p>
+
 
                 </div>
             </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org