cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1766733 [8/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/g...
Date Wed, 26 Oct 2016 20:28:36 GMT
Modified: cordova/site/public/docs/en/6.x/reference/cordova-cli/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-cli/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-cli/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-cli/index.html Wed Oct 26 20:28:35 2016
@@ -749,7 +749,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-battery-status/index.html">
-                cordova-plugin-battery-status
+                Battery Status
             </a>
             
         
@@ -764,7 +764,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
         
@@ -779,7 +779,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -794,7 +794,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -809,7 +809,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -824,7 +824,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -839,7 +839,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -854,7 +854,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -869,7 +869,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -884,7 +884,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -899,7 +899,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -914,7 +914,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -929,7 +929,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
         
@@ -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="" 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>
 
@@ -2719,6 +2719,10 @@
 <td>help <command></td>
 <td>Get help for a command</td>
 </tr>
+<tr>
+<td>telemetry</td>
+<td>Turn telemetry collection on or off</td>
+</tr>
 </tbody></table>
 
 <h2>Project Command List</h2>
@@ -2795,6 +2799,10 @@
 <td>--nohooks</td>
 <td>Suppress executing hooks (taking RegExp hook patterns as parameters)</td>
 </tr>
+<tr>
+<td>--no-telemetry</td>
+<td>Disable telemetry collection for the current command.</td>
+</tr>
 </tbody></table>
 
 <h2>Platform-specific options</h2>
@@ -2810,8 +2818,12 @@ cordova create myApp com.myCompany.myApp
 cd myApp
 # Add camera plugin to the project and remember that in config.xml
 cordova plugin add cordova-plugin-camera --save
+# Add camera plugin to the project and remember that in config.xml. Use npm install to fetch.
+cordova plugin add cordova-plugin-camera --save --fetch
 # Add android platform to the project and remember that in config.xml
 cordova platform add android --save
+# Add android platform to the project and remember that in config.xml. Use npm install to fetch.
+cordova platform add android --save --fetch
 # Check to see if your system is configured for building android platform.
 cordova requirements android
 # Build the android and emit verbose logs.
@@ -2844,7 +2856,7 @@ cordova build android --release -- --key
 </tr>
 <tr>
 <td>id</td>
-<td><em>Default</em>: <code>io.cordova.hellocordova</code> <br/>  Reverse domain-style identifier that maps to <code>id</code> attirbute of <code>widget</code> element in <code>config.xml</code>. This can be changed but there may be code generated using this value, such as Java package names. It is recommended that you select an appropriate value.</td>
+<td><em>Default</em>: <code>io.cordova.hellocordova</code> <br/>  Reverse domain-style identifier that maps to <code>id</code> attribute of <code>widget</code> element in <code>config.xml</code>. This can be changed but there may be code generated using this value, such as Java package names. It is recommended that you select an appropriate value.</td>
 </tr>
 <tr>
 <td>name</td>
@@ -2880,7 +2892,7 @@ cordova build android --release -- --key
 
 <h3>Directory structure</h3>
 
-<p>A Cordova application created with <code>cordova-cli</code> will have the following directory structure:</p>
+<p>Cordova CLI works with the following directory structure:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">myapp/
 |-- config.xml
 |-- hooks/
@@ -2958,11 +2970,12 @@ www/
 
 <h3>Syntax</h3>
 <div class="highlight"><pre><code class="language-bash" data-lang="bash">cordova <span class="o">{</span>platform | platforms<span class="o">}</span> <span class="o">[</span>
-    add &lt;platform-spec&gt; <span class="o">[</span>...] <span class="o">{</span>--save | <span class="nv">link</span><span class="o">=</span>&lt;path&gt; <span class="o">}</span> |
-    <span class="o">{</span>remove | rm<span class="o">}</span>  platform <span class="o">[</span>...] |
+    add &lt;platform-spec&gt; <span class="o">[</span>...] <span class="o">{</span>--save | <span class="nv">link</span><span class="o">=</span>&lt;path&gt; | --fetch <span class="o">}</span> |
+    <span class="o">{</span>remove | rm<span class="o">}</span>  platform <span class="o">[</span>...] <span class="o">{</span>--save | --fetch<span class="o">}</span>|
     <span class="o">{</span>list | ls<span class="o">}</span>  |
     check |
-    save <span class="o">]</span>
+    save |
+    update <span class="o">]</span>
 </code></pre></div>
 <table><thead>
 <tr>
@@ -2987,6 +3000,11 @@ www/
 <td>When <code>&lt;platform-spec&gt;</code> is a local path, links the platform library directly instead of making a copy of it (support varies by platform; useful for platform development)</td>
 </tr>
 <tr>
+<td></td>
+<td>--fetch</td>
+<td>Fetches the platform using <code>npm install</code> and stores it into the apps <code>node_modules</code> directory</td>
+</tr>
+<tr>
 <td>remove <code>&lt;platform&gt;</code> [...]</td>
 <td></td>
 <td>Remove specified platforms</td>
@@ -2997,6 +3015,11 @@ www/
 <td>Delete specified platforms from <code>config.xml</code> after removing them</td>
 </tr>
 <tr>
+<td></td>
+<td>--fetch</td>
+<td>Removes the platform using <code>npm uninstall</code> and removes it from the apps <code>node_modules</code> directory</td>
+</tr>
+<tr>
 <td>update <code>platform</code> [...]</td>
 <td></td>
 <td>Update specified platforms</td>
@@ -3007,6 +3030,11 @@ www/
 <td>Updates the version specified in <code>config.xml</code></td>
 </tr>
 <tr>
+<td></td>
+<td>--fetch</td>
+<td>Fetches the platform using <code>npm install</code> and stores it into the apps <code>node_modules</code> directory</td>
+</tr>
+<tr>
 <td>list</td>
 <td></td>
 <td>List all installed and available platforms</td>
@@ -3082,6 +3110,10 @@ www/
 <li><p>Add pinned version of the <code>android</code> and <code>ios</code> platform and save the downloaded version to <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova platform add android ios --save
 </code></pre></div></li>
+<li><p>Add pinned version of the <code>android</code> and <code>ios</code> platform and save the downloaded version to <code>config.xml</code>. Install
+to the project using <code>npm install</code> and store it in the apps <code>node_modules</code> directory:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova platform add android ios --save --fetch
+</code></pre></div></li>
 <li><p>Add <code>android</code> platform with <a href="http://semver.org/">semver</a> version ^5.0.0 and save it to <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova platform add android@^5.0.0 --save
 </code></pre></div></li>
@@ -3097,6 +3129,10 @@ www/
 <li><p>Remove <code>android</code> platform from the project and from <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova platform rm android --save
 </code></pre></div></li>
+<li><p>Remove <code>android</code> platform from the project and from <code>config.xml</code>. Run <code>npm uninstall</code> to remove it
+from the <code>node_modules</code> directory.</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova platform rm android --save --fetch
+</code></pre></div></li>
 <li><p>List available and installed platforms with version numbers. This is useful to find version numbers when reporting issues:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova platform ls
 </code></pre></div></li>
@@ -3113,8 +3149,8 @@ www/
 
 <h3>Syntax</h3>
 <div class="highlight"><pre><code class="language-bash" data-lang="bash">cordova <span class="o">{</span>plugin | plugins<span class="o">}</span> <span class="o">[</span>
-    add &lt;plugin-spec&gt; <span class="o">[</span>..] <span class="o">{</span>--searchpath<span class="o">=</span>&lt;directory&gt; | --noregistry | --link | --save | --browserify | --force<span class="o">}</span> |
-    <span class="o">{</span>remove | rm<span class="o">}</span> <span class="o">{</span>&lt;pluginid&gt; | &lt;name&gt;<span class="o">}</span> --save |
+    add &lt;plugin-spec&gt; <span class="o">[</span>..] <span class="o">{</span>--searchpath<span class="o">=</span>&lt;directory&gt; | --noregistry | --link | --save | --browserify | --force | --fetch<span class="o">}</span> |
+    <span class="o">{</span>remove | rm<span class="o">}</span> <span class="o">{</span>&lt;pluginid&gt; | &lt;name&gt;<span class="o">}</span> --save --fetch |
     <span class="o">{</span>list | ls<span class="o">}</span> |
     search <span class="o">[</span>&lt;keyword&gt;] |
     save |
@@ -3135,7 +3171,7 @@ www/
 <tr>
 <td></td>
 <td>--searchpath <code>&lt;directory&gt;</code></td>
-<td>When looking up plugins by ID, look in this directory and each of its subdirectories before hitting the registry. Multiple search paths can be specified. Use &#39;:&#39; as a separator in *nix based systems and &#39;;&#39; for Windows.</td>
+<td>When looking up plugins by ID, look in this directory and each of its subdirectories before hitting the registry. Multiple search paths can be specified. Use &#39;:&#39; as a separator in <code>*nix</code> based systems and &#39;;&#39; for Windows.</td>
 </tr>
 <tr>
 <td></td>
@@ -3163,6 +3199,11 @@ www/
 <td><em>Introduced in version 6.1.</em> Forces copying source files from the plugin even if the same file already exists in the target directory.</td>
 </tr>
 <tr>
+<td></td>
+<td>--fetch</td>
+<td>Fetches the plugin using <code>npm install</code> and stores it into the apps <code>node_modules</code> directory</td>
+</tr>
+<tr>
 <td>remove `<pluginid></td>
 <td><name>` [...]</td>
 <td></td>
@@ -3173,6 +3214,11 @@ www/
 <td>Remove the specified plugin from config.xml</td>
 </tr>
 <tr>
+<td></td>
+<td>--fetch</td>
+<td>Removes the plugin using <code>npm uninstall</code> and removes it from the apps <code>node_modules</code> directory</td>
+</tr>
+<tr>
 <td>list</td>
 <td></td>
 <td>List currently installed plugins</td>
@@ -3192,7 +3238,7 @@ www/
 <h3>Plugin-spec</h3>
 
 <p>There are a number of ways to specify a plugin:</p>
-<div class="highlight"><pre><code class="language-" data-lang="">&lt;plugin-spec&gt; : pluginID[@version]|directory|url[#commit-ish][:subdir]
+<div class="highlight"><pre><code class="language-" data-lang="">&lt;plugin-spec&gt; : [@scope/]pluginID[@version]|directory|url[#commit-ish][:subdir]
 </code></pre></div>
 <table><thead>
 <tr>
@@ -3201,6 +3247,10 @@ www/
 </tr>
 </thead><tbody>
 <tr>
+<td>scope</td>
+<td>Scope of plugin published as a <a href="https://docs.npmjs.com/misc/scope">scoped npm package</a></td>
+</tr>
+<tr>
 <td>plugin</td>
 <td>Plugin id (id of plugin in npm registry or in --searchPath)</td>
 </tr>
@@ -3222,7 +3272,7 @@ www/
 </tr>
 <tr>
 <td>subdir</td>
-<td>Sub-directory to find plugin.xml for the specified plugin.</td>
+<td>Sub-directory to find plugin.xml for the specified plugin. (Doesn&#39;t work with <code>--fetch</code> option)</td>
 </tr>
 </tbody></table>
 
@@ -3247,6 +3297,9 @@ based on the following criteria (listed
 <li><p>Add <code>cordova-plugin-camera</code> with <a href="http://semver.org/">semver</a> version ^2.0.0 and save it to <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-camera@^2.0.0 --save
 </code></pre></div></li>
+<li><p>Add <code>cordova-plugin-camera</code> with <a href="http://semver.org/">semver</a> version ^2.0.0 and <code>npm install</code> it. It will be stored in the <code>node_modules</code> directory:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-camera@^2.0.0 --fetch
+</code></pre></div></li>
 <li><p>Clone the specified git repo, checkout to tag <code>2.1.0</code>, look for plugin.xml in the <code>plugin</code> directory, and add it to the project. Save the <code>plugin-spec</code> to <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add https://github.com/apache/cordova-plugin-camera.git#2.1.0:plugin --save
 </code></pre></div></li>
@@ -3259,11 +3312,22 @@ based on the following criteria (listed
 <li><p>Remove the plugin from the project and the <code>config.xml</code>:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin rm camera --save
 </code></pre></div></li>
+<li><p>Remove the plugin from the project and <code>npm uninstall</code> it. Removes it from the <code>node_modules</code> directory:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin rm camera --fetch
+</code></pre></div></li>
 <li><p>List all plugins installed in the project:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin ls
 </code></pre></div></li>
 </ul>
 
+<h3>Conflicting plugins</h3>
+
+<p>Conflicting plugins may occur when adding plugins that use <code>edit-config</code> tags in their plugin.xml file. <code>edit-config</code> allows plugins to add or replace attributes of XML elements.  </p>
+
+<p>This feature can cause issues with the application if more than one plugin tries to modify the same XML element. Conflict detection has been implemented to prevent plugins from being added so one plugin doesn&#39;t try to overwrite another plugin&#39;s <code>edit-config</code> changes. An error will be thrown when a conflict in <code>edit-config</code> has been found and the plugin won&#39;t be added. The error message will mention that all conflicts must be resolved before the plugin can be added. One option to resolving the <code>edit-config</code> conflict is to make changes to the affected plugins&#39; plugin.xml so that they do not modify the same XML element. The other option is to use the <code>--force</code> flag to force add the plugin. This option should be used with caution as it ignores the conflict detection and will overwrite all conflicts it has with other plugins, thus may leave the other plugins in a bad state.</p>
+
+<p>Refer to the <a href="https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#edit-config">plugin.xml guide</a> for managing <code>edit-config</code>, resolving conflicts, and examples.</p>
+
 <h2>cordova prepare command</h2>
 
 <h3>Synopsis</h3>
@@ -3273,7 +3337,7 @@ copies plugin files for specified platfo
 
 <h3>Syntax</h3>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova prepare [&lt;platform&gt; [..]]
-     [--browserify]
+     [--browserify | --fetch]
 </code></pre></div>
 <h3>Options</h3>
 
@@ -3291,6 +3355,10 @@ copies plugin files for specified platfo
 <td>--browserify</td>
 <td>Compile plugin JS at build time using browserify instead of runtime.</td>
 </tr>
+<tr>
+<td>--fetch</td>
+<td>When restoring plugins or platforms, fetch will <code>npm install</code> the missing modules.</td>
+</tr>
 </tbody></table>
 
 <h2>cordova compile command</h2>
@@ -3382,11 +3450,12 @@ It only performs the compilation step wi
 
 <h3>Synopsis</h3>
 
-<p>Prepares, builds (unless <code>--nobuild</code> is specified) and deploys app on specified platform devices/emulators. If a device is connected it will be used, unless an eligible emulator is already running.</p>
+<p>Prepares, builds, and deploys app on specified platform devices/emulators. If a device is connected it will be used, unless an eligible emulator is already running.</p>
 
 <h3>Syntax</h3>
 <div class="highlight"><pre><code class="language-bash" data-lang="bash">cordova run <span class="o">[</span>&lt;platform&gt; <span class="o">[</span>...]]
-    <span class="o">[</span>--list | --nobuild <span class="o">]</span>
+    <span class="o">[</span>--list | --debug | --release]
+    <span class="o">[</span>--noprepare] <span class="o">[</span>--nobuild]
     <span class="o">[</span>--device|--emulator|--target<span class="o">=</span>&lt;targetName&gt;]
     <span class="o">[</span>--buildConfig<span class="o">=</span>&lt;configfile&gt;]
     <span class="o">[</span>--browserify]
@@ -3403,8 +3472,8 @@ It only performs the compilation step wi
 <td>Platform name(s) to run. If not specified, all platforms are run.</td>
 </tr>
 <tr>
-<td>--nobuild</td>
-<td>Skip building</td>
+<td>--list</td>
+<td>Lists available targets. Displays both device and emulator deployment targets unless specified</td>
 </tr>
 <tr>
 <td>--debug</td>
@@ -3415,6 +3484,14 @@ It only performs the compilation step wi
 <td>Deploy a release build</td>
 </tr>
 <tr>
+<td>--noprepare</td>
+<td>Skip preparing (available in Cordova v6.2 or later)</td>
+</tr>
+<tr>
+<td>--nobuild</td>
+<td>Skip building</td>
+</tr>
+<tr>
 <td>--device</td>
 <td>Deploy to a device</td>
 </tr>
@@ -3427,10 +3504,6 @@ It only performs the compilation step wi
 <td>Deploy to a specific target emulator/device. Use <code>--list</code> to display target options</td>
 </tr>
 <tr>
-<td>--list</td>
-<td>Lists available targets. Displays both device and emulator deployment targets unless specified</td>
-</tr>
-<tr>
 <td>--buildConfig=<code>&lt;configFile&gt;</code></td>
 <td>Default: build.json in cordova root directory. <br/> Use the specified build configuration file. <code>build.json</code> file is used to specify paramaters to customize the app build process esecially related to signing the package.</td>
 </tr>
@@ -3518,6 +3591,45 @@ base of your project.</p>
 <h3>Syntax</h3>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova serve [port]
 </code></pre></div>
+<h2>cordova telemetry command</h2>
+
+<h3>Synopsis</h3>
+
+<p>Turns telemetry collection on or off.</p>
+
+<h3>Syntax</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova telemetry [STATE]
+</code></pre></div>
+<table><thead>
+<tr>
+<th>Option</th>
+<th>Description</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>on</td>
+<td>Turn telemetry collection on.</td>
+</tr>
+<tr>
+<td>off</td>
+<td>Turn telemetry collection off.</td>
+</tr>
+</tbody></table>
+
+<h3>Details</h3>
+
+<p>A timed prompt asking the user to opt-in or out is displayed the first time cordova is run.
+ It lasts for 30 seconds, after which the user is automatically opted-out if he doesn&#39;t provide any answer.
+ In CI environments, the <code>CI</code> environment variable can be set, which will prevent the prompt from showing up.
+ Telemetry collection can also be turned off on a single command by using the <code>--no-telemetry</code> flag.</p>
+
+<h3>Examples</h3>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova telemetry on
+cordova telemetry off
+cordova build --no-telemetry
+</code></pre></div>
+<p>For details, see our privacy notice: https://cordova.apache.org/privacy</p>
+
 <h2>cordova help command</h2>
 
 <h3>Synopsis</h3>

Modified: cordova/site/public/docs/en/6.x/reference/cordova-plugin-battery-status/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-battery-status/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-battery-status/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-battery-status/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="Get events for device battery level. ">
 
     <title>
         
             
-                cordova-plugin-battery-status - Apache Cordova
+                Battery Status - Apache Cordova
             
         
     </title>
@@ -747,7 +747,7 @@
     <li>
         
             <a class="this-page" href="../../reference/cordova-plugin-battery-status/index.html">
-                cordova-plugin-battery-status
+                Battery Status
             </a>
             
                 <span class="entry-highlight"></span>
@@ -764,7 +764,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
         
@@ -779,7 +779,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -794,7 +794,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -809,7 +809,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -824,7 +824,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -839,7 +839,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -854,7 +854,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -869,7 +869,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -884,7 +884,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -899,7 +899,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -914,7 +914,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -929,7 +929,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
         
@@ -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="this-page" 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="" 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-battery-status"><img src="https://travis-ci.org/apache/cordova-plugin-battery-status.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-battery-status/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-battery-status" 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-battery-status/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-battery-status" 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-battery-status/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-battery-status" 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-battery-status/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-battery-status" 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-battery-status/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-battery-status" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="https://travis-ci.org/apache/cordova-plugin-battery-status"><img src="https://travis-ci.org/apache/cordova-plugin-battery-status.svg?branch=master" alt="Build Status"></a></td>
+</tr>
+</tbody></table>
 
 <h1>cordova-plugin-battery-status</h1>
 

Modified: cordova/site/public/docs/en/6.x/reference/cordova-plugin-camera/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/reference/cordova-plugin-camera/index.html?rev=1766733&r1=1766732&r2=1766733&view=diff
==============================================================================
--- cordova/site/public/docs/en/6.x/reference/cordova-plugin-camera/index.html (original)
+++ cordova/site/public/docs/en/6.x/reference/cordova-plugin-camera/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="Take pictures with the device camera. ">
 
     <title>
         
             
-                cordova-plugin-camera - Apache Cordova
+                Camera - 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="this-page" href="../../reference/cordova-plugin-camera/index.html">
-                cordova-plugin-camera
+                Camera
             </a>
             
                 <span class="entry-highlight"></span>
@@ -779,7 +779,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-console/index.html">
-                cordova-plugin-console
+                Console
             </a>
             
         
@@ -794,7 +794,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-contacts/index.html">
-                cordova-plugin-contacts
+                Contacts
             </a>
             
         
@@ -809,7 +809,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device/index.html">
-                cordova-plugin-device
+                Device
             </a>
             
         
@@ -824,7 +824,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-motion/index.html">
-                cordova-plugin-device-motion
+                Device Motion
             </a>
             
         
@@ -839,7 +839,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-device-orientation/index.html">
-                cordova-plugin-device-orientation
+                Device Orientation
             </a>
             
         
@@ -854,7 +854,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-dialogs/index.html">
-                cordova-plugin-dialogs
+                Dialogs
             </a>
             
         
@@ -869,7 +869,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file/index.html">
-                cordova-plugin-file
+                File
             </a>
             
         
@@ -884,7 +884,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-file-transfer/index.html">
-                cordova-plugin-file-transfer
+                File Transfer
             </a>
             
         
@@ -899,7 +899,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-geolocation/index.html">
-                cordova-plugin-geolocation
+                Geolocation
             </a>
             
         
@@ -914,7 +914,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-globalization/index.html">
-                cordova-plugin-globalization
+                Globalization
             </a>
             
         
@@ -929,7 +929,7 @@
     <li>
         
             <a class="" href="../../reference/cordova-plugin-inappbrowser/index.html">
-                cordova-plugin-inappbrowser
+                Inappbrowser
             </a>
             
         
@@ -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="this-page" 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="" 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-camera"><img src="https://travis-ci.org/apache/cordova-plugin-camera.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-camera/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-camera" 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-camera/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-camera" 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-camera/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-camera" 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-camera/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-camera" 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-camera/"><img src="http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera" alt="Build Status"></a></td>
+<td style="text-align: center"><a href="https://travis-ci.org/apache/cordova-plugin-camera"><img src="https://travis-ci.org/apache/cordova-plugin-camera.svg?branch=master" alt="Build Status"></a></td>
+</tr>
+</tbody></table>
 
 <h1>cordova-plugin-camera</h1>
 
@@ -2748,9 +2766,33 @@ function onDeviceReady() {
 <a href="https://www.npmjs.com/package/jsdoc-to-markdown">jsdoc-to-markdown</a> is used to generate the docs.<br>
 Documentation consists of template and API docs produced from the plugin JS code and should be regenerated before each commit (done automatically via <a href="https://github.com/typicode/husky">husky</a>, running <code>npm run gen-docs</code> script as a <code>precommit</code> hook - see <code>package.json</code> for details).</p>
 
+<h3>iOS Quirks</h3>
+
+<p>Since iOS 10 it&#39;s mandatory to add a <code>NSCameraUsageDescription</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>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>
+</ul>
+
+<h2>- <code>PHOTOLIBRARY_USAGE_DESCRIPTION</code> for <code>NSPhotoLibraryUsageDescriptionentry</code></h2>
+
+<p>Example:</p>
+<div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message"
+</code></pre></div>
+<p>If you don&#39;t pass the variable, the plugin will add an empty string as value.</p>
+
 <hr>
 
-<h1>API Reference</h1>
+<h1>API Reference <a name="reference"></a></h1>
 
 <ul>
 <li><p><a href="#module_camera">camera</a></p>
@@ -2797,27 +2839,24 @@ Once the user snaps the photo, the camer
 
 <p>If <code>Camera.sourceType</code> is <code>Camera.PictureSourceType.PHOTOLIBRARY</code> or
 <code>Camera.PictureSourceType.SAVEDPHOTOALBUM</code>, then a dialog displays
-that allows users to select an existing image.  The
-<code>camera.getPicture</code> function returns a <a href="#module_CameraPopoverHandle"><code>CameraPopoverHandle</code></a> object,
-which can be used to reposition the image selection dialog, for
-example, when the device orientation changes.</p>
+that allows users to select an existing image.</p>
 
 <p>The return value is sent to the <a href="#module_camera.onSuccess"><code>cameraSuccess</code></a> callback function, in
 one of the following formats, depending on the specified
 <code>cameraOptions</code>:</p>
 
 <ul>
-<li><p>A <code>String</code> containing the Base64-encoded photo image.</p></li>
-<li><p>A <code>String</code> representing the image file location on local storage (default).</p></li>
+<li>A <code>String</code> containing the Base64-encoded photo image.</li>
+<li>A <code>String</code> representing the image file location on local storage (default).</li>
 </ul>
 
 <p>You can do whatever you want with the encoded image or URI, for
 example:</p>
 
 <ul>
-<li><p>Render the image in an <code>&lt;img&gt;</code> tag, as in the example below</p></li>
-<li><p>Save the data locally (<code>LocalStorage</code>, <a href="http://brianleroux.github.com/lawnchair/">Lawnchair</a>, etc.)</p></li>
-<li><p>Post the data to a remote server</p></li>
+<li>Render the image in an <code>&lt;img&gt;</code> tag, as in the example below</li>
+<li>Save the data locally (<code>LocalStorage</code>, <a href="http://brianleroux.github.com/lawnchair/">Lawnchair</a>, etc.)</li>
+<li>Post the data to a remote server</li>
 </ul>
 
 <p><strong>NOTE</strong>: Photo resolution on newer devices is quite good. Photos
@@ -3055,6 +3094,12 @@ after calling <a href="#module_camera.ge
 
 <h3>Camera.DestinationType : <code>enum</code></h3>
 
+<p>Defines the output format of <code>Camera.getPicture</code> call.
+<em>Note:</em> On iOS passing <code>DestinationType.NATIVE_URI</code> along with
+<code>PictureSourceType.PHOTOLIBRARY</code> or <code>PictureSourceType.SAVEDPHOTOALBUM</code> will
+disable any image modifications (resize, quality change, cropping, etc.) due
+to implementation specific.</p>
+
 <p><strong>Kind</strong>: static enum property of <code><a href="#module_Camera">Camera</a></code><br>
 <strong>Properties</strong></p>
 
@@ -3154,6 +3199,11 @@ after calling <a href="#module_camera.ge
 
 <h3>Camera.PictureSourceType : <code>enum</code></h3>
 
+<p>Defines the output format of <code>Camera.getPicture</code> call.
+<em>Note:</em> On iOS passing <code>PictureSourceType.PHOTOLIBRARY</code> or <code>PictureSourceType.SAVEDPHOTOALBUM</code>
+along with <code>DestinationType.NATIVE_URI</code> will disable any image modifications (resize, quality
+change, cropping, etc.) due to implementation specific.</p>
+
 <p><strong>Kind</strong>: static enum property of <code><a href="#module_Camera">Camera</a></code><br>
 <strong>Properties</strong></p>
 
@@ -3169,7 +3219,7 @@ after calling <a href="#module_camera.ge
 <td>PHOTOLIBRARY</td>
 <td><code>number</code></td>
 <td><code>0</code></td>
-<td>Choose image from picture library (same as SAVEDPHOTOALBUM for Android)</td>
+<td>Choose image from the device&#39;s photo library (same as SAVEDPHOTOALBUM for Android)</td>
 </tr>
 <tr>
 <td>CAMERA</td>
@@ -3181,7 +3231,7 @@ after calling <a href="#module_camera.ge
 <td>SAVEDPHOTOALBUM</td>
 <td><code>number</code></td>
 <td><code>2</code></td>
-<td>Choose image from picture library (same as PHOTOLIBRARY for Android)</td>
+<td>Choose image only from the device&#39;s Camera Roll album (same as PHOTOLIBRARY for Android)</td>
 </tr>
 </tbody></table>
 
@@ -3326,7 +3376,7 @@ location.</p>
 </ul>
 
 <p><strong>Example</strong>  </p>
-<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">var</span> <span class="nx">cameraPopoverHandle</span> <span class="o">=</span> <span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="nx">onSuccess</span><span class="p">,</span> <span class="nx">onFail</span><span class="p">,</span>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="nx">onSuccess</span><span class="p">,</span> <span class="nx">onFail</span><span class="p">,</span>
 <span class="p">{</span>
     <span class="na">destinationType</span><span class="p">:</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">DestinationType</span><span class="p">.</span><span class="nx">FILE_URI</span><span class="p">,</span>
     <span class="na">sourceType</span><span class="p">:</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PictureSourceType</span><span class="p">.</span><span class="nx">PHOTOLIBRARY</span><span class="p">,</span>
@@ -3335,6 +3385,7 @@ location.</p>
 
 <span class="c1">// Reposition the popover if the orientation changes.</span>
 <span class="nb">window</span><span class="p">.</span><span class="nx">onorientationchange</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
+    <span class="kd">var</span> <span class="nx">cameraPopoverHandle</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">CameraPopoverHandle</span><span class="p">();</span>
     <span class="kd">var</span> <span class="nx">cameraPopoverOptions</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">CameraPopoverOptions</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PopoverArrowDirection</span><span class="p">.</span><span class="nx">ARROW_ANY</span><span class="p">);</span>
     <span class="nx">cameraPopoverHandle</span><span class="p">.</span><span class="nx">setPosition</span><span class="p">(</span><span class="nx">cameraPopoverOptions</span><span class="p">);</span>
 <span class="p">}</span>
@@ -3426,6 +3477,16 @@ displays:</p>
 <p>Invoking the native camera application while the device is connected
 via Zune does not work, and triggers an error callback.</p>
 
+<h4>Windows quirks</h4>
+
+<p>On Windows Phone 8.1 using <code>SAVEDPHOTOALBUM</code> or <code>PHOTOLIBRARY</code> as a source type causes application to suspend until file picker returns the selected image and
+then restore with start page as defined in app&#39;s <code>config.xml</code>. In case when <code>camera.getPicture</code> was called from different page, this will lead to reloading
+start page from scratch and success and error callbacks will never be called.</p>
+
+<p>To avoid this we suggest using SPA pattern or call <code>camera.getPicture</code> only from your app&#39;s start page.</p>
+
+<p>More information about Windows Phone 8.1 picker APIs is here: <a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn720490.aspx">How to continue your Windows Phone app after calling a file picker</a></p>
+
 <h4>Tizen Quirks</h4>
 
 <p>Tizen only supports a <code>destinationType</code> of
@@ -3480,6 +3541,7 @@ via Zune does not work, and triggers an
 <ul>
 <li><p>When using <code>destinationType.FILE_URI</code>, photos are saved in the application&#39;s temporary directory. The contents of the application&#39;s temporary directory is deleted when the application ends.</p></li>
 <li><p>When using <code>destinationType.NATIVE_URI</code> and <code>sourceType.CAMERA</code>, photos are saved in the saved photo album regardless on the value of <code>saveToPhotoAlbum</code> parameter.</p></li>
+<li><p>When using <code>destinationType.NATIVE_URI</code> and <code>sourceType.PHOTOLIBRARY</code> or <code>sourceType.SAVEDPHOTOALBUM</code>, all editing options are ignored and link is returned to original picture.</p></li>
 </ul>
 
 <h4>Tizen Quirks</h4>
@@ -3499,6 +3561,184 @@ via Zune does not work, and triggers an
 <li><p>Ignores the <code>mediaType</code> property of <code>cameraOptions</code> as the Windows Phone SDK does not provide a way to choose videos from PHOTOLIBRARY.</p></li>
 </ul>
 
+<h2>Sample: Take Pictures, Select Pictures from the Picture Library, and Get Thumbnails <a name="sample"></a></h2>
+
+<p>The Camera plugin allows you to do things like open the device&#39;s Camera app and take a picture, or open the file picker and select one. The code snippets in this section demonstrate different tasks including:</p>
+
+<ul>
+<li>Open the Camera app and <a href="#takePicture">take a Picture</a></li>
+<li>Take a picture and <a href="#getThumbnails">return thumbnails</a> (resized picture)</li>
+<li>Take a picture and <a href="#convert">generate a FileEntry object</a></li>
+<li><a href="#selectFile">Select a file</a> from the picture library</li>
+<li>Select a JPEG image and <a href="#getFileThumbnails">return thumbnails</a> (resized image)</li>
+<li>Select an image and <a href="#convert">generate a FileEntry object</a></li>
+</ul>
+
+<h2>Take a Picture <a name="takePicture"></a></h2>
+
+<p>Before you can take a picture, you need to set some Camera plugin options to pass into the Camera plugin&#39;s <code>getPicture</code> function. Here is a common set of recommendations. In this example, you create the object that you will use for the Camera options, and set the <code>sourceType</code> dynamically to support both the Camera app and the file picker.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">setOptions</span><span class="p">(</span><span class="nx">srcType</span><span class="p">)</span> <span class="p">{</span>
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span>
+        <span class="c1">// Some common settings are 20, 50, and 100</span>
+        <span class="na">quality</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span>
+        <span class="na">destinationType</span><span class="p">:</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">DestinationType</span><span class="p">.</span><span class="nx">FILE_URI</span><span class="p">,</span>
+        <span class="c1">// In this app, dynamically set the picture source, Camera or photo gallery</span>
+        <span class="na">sourceType</span><span class="p">:</span> <span class="nx">srcType</span><span class="p">,</span>
+        <span class="na">encodingType</span><span class="p">:</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">EncodingType</span><span class="p">.</span><span class="nx">JPEG</span><span class="p">,</span>
+        <span class="na">mediaType</span><span class="p">:</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">MediaType</span><span class="p">.</span><span class="nx">PICTURE</span><span class="p">,</span>
+        <span class="na">allowEdit</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
+        <span class="na">correctOrientation</span><span class="p">:</span> <span class="kc">true</span>  <span class="c1">//Corrects Android orientation quirks</span>
+    <span class="p">}</span>
+    <span class="k">return</span> <span class="nx">options</span><span class="p">;</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>Typically, you want to use a FILE<em>URI instead of a DATA</em>URL to avoid most memory issues. JPEG is the recommended encoding type for Android.</p>
+
+<p>You take a picture by passing in the options object to <code>getPicture</code>, which takes a CameraOptions object as the third argument. When you call <code>setOptions</code>, pass <code>Camera.PictureSourceType.CAMERA</code> as the picture source.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">openCamera</span><span class="p">(</span><span class="nx">selection</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">srcType</span> <span class="o">=</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PictureSourceType</span><span class="p">.</span><span class="nx">CAMERA</span><span class="p">;</span>
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="nx">setOptions</span><span class="p">(</span><span class="nx">srcType</span><span class="p">);</span>
+    <span class="kd">var</span> <span class="nx">func</span> <span class="o">=</span> <span class="nx">createNewFileEntry</span><span class="p">;</span>
+
+    <span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="kd">function</span> <span class="nx">cameraSuccess</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="nx">displayImage</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">);</span>
+        <span class="c1">// You may choose to copy the picture, save it somewhere, or upload.</span>
+        <span class="nx">func</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="kd">function</span> <span class="nx">cameraError</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">console</span><span class="p">.</span><span class="nx">debug</span><span class="p">(</span><span class="s2">"Unable to obtain picture: "</span> <span class="o">+</span> <span class="nx">error</span><span class="p">,</span> <span class="s2">"app"</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>Once you take the picture, you can display it or do something else. In this example, call the app&#39;s <code>displayImage</code> function from the preceding code.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">displayImage</span><span class="p">(</span><span class="nx">imgUri</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">elem</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'imageFile'</span><span class="p">);</span>
+    <span class="nx">elem</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="nx">imgUri</span><span class="p">;</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>To display the image on some platforms, you might need to include the main part of the URI in the Content-Security-Policy <code>&lt;meta&gt;</code> element in index.html. For example, on Windows 10, you can include <code>ms-appdata:</code> in your <code>&lt;meta&gt;</code> element. Here is an example.</p>
+<div class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">"Content-Security-Policy"</span> <span class="na">content=</span><span class="s">"default-src 'self' data: gap: ms-appdata: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"</span><span class="nt">&gt;</span>
+</code></pre></div>
+<h2>Take a Picture and Return Thumbnails (Resize the Picture) <a name="getThumbnails"></a></h2>
+
+<p>To get smaller images, you can return a resized image by passing both <code>targetHeight</code> and <code>targetWidth</code> values with your CameraOptions object. In this example, you resize the returned image to fit in a 100px by 100px box (the aspect ratio is maintained, so 100px is either the height or width, whichever is greater in the source).</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">openCamera</span><span class="p">(</span><span class="nx">selection</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">srcType</span> <span class="o">=</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PictureSourceType</span><span class="p">.</span><span class="nx">CAMERA</span><span class="p">;</span>
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="nx">setOptions</span><span class="p">(</span><span class="nx">srcType</span><span class="p">);</span>
+    <span class="kd">var</span> <span class="nx">func</span> <span class="o">=</span> <span class="nx">createNewFileEntry</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">selection</span> <span class="o">==</span> <span class="s2">"camera-thmb"</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">options</span><span class="p">.</span><span class="nx">targetHeight</span> <span class="o">=</span> <span class="mi">100</span><span class="p">;</span>
+        <span class="nx">options</span><span class="p">.</span><span class="nx">targetWidth</span> <span class="o">=</span> <span class="mi">100</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="kd">function</span> <span class="nx">cameraSuccess</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// Do something</span>
+
+    <span class="p">},</span> <span class="kd">function</span> <span class="nx">cameraError</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">console</span><span class="p">.</span><span class="nx">debug</span><span class="p">(</span><span class="s2">"Unable to obtain picture: "</span> <span class="o">+</span> <span class="nx">error</span><span class="p">,</span> <span class="s2">"app"</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
+<span class="p">}</span>
+</code></pre></div>
+<h2>Select a File from the Picture Library <a name="selectFile"></a></h2>
+
+<p>When selecting a file using the file picker, you also need to set the CameraOptions object. In this example, set the <code>sourceType</code> to <code>Camera.PictureSourceType.SAVEDPHOTOALBUM</code>. To open the file picker, call <code>getPicture</code> just as you did in the previous example, passing in the success and error callbacks along with CameraOptions object.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">openFilePicker</span><span class="p">(</span><span class="nx">selection</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">srcType</span> <span class="o">=</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PictureSourceType</span><span class="p">.</span><span class="nx">SAVEDPHOTOALBUM</span><span class="p">;</span>
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="nx">setOptions</span><span class="p">(</span><span class="nx">srcType</span><span class="p">);</span>
+    <span class="kd">var</span> <span class="nx">func</span> <span class="o">=</span> <span class="nx">createNewFileEntry</span><span class="p">;</span>
+
+    <span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="kd">function</span> <span class="nx">cameraSuccess</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// Do something</span>
+
+    <span class="p">},</span> <span class="kd">function</span> <span class="nx">cameraError</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">console</span><span class="p">.</span><span class="nx">debug</span><span class="p">(</span><span class="s2">"Unable to obtain picture: "</span> <span class="o">+</span> <span class="nx">error</span><span class="p">,</span> <span class="s2">"app"</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
+<span class="p">}</span>
+</code></pre></div>
+<h2>Select an Image and Return Thumbnails (resized images) <a name="getFileThumbnails"></a></h2>
+
+<p>Resizing a file selected with the file picker works just like resizing using the Camera app; set the <code>targetHeight</code> and <code>targetWidth</code> options.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">openFilePicker</span><span class="p">(</span><span class="nx">selection</span><span class="p">)</span> <span class="p">{</span>
+
+    <span class="kd">var</span> <span class="nx">srcType</span> <span class="o">=</span> <span class="nx">Camera</span><span class="p">.</span><span class="nx">PictureSourceType</span><span class="p">.</span><span class="nx">SAVEDPHOTOALBUM</span><span class="p">;</span>
+    <span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="nx">setOptions</span><span class="p">(</span><span class="nx">srcType</span><span class="p">);</span>
+    <span class="kd">var</span> <span class="nx">func</span> <span class="o">=</span> <span class="nx">createNewFileEntry</span><span class="p">;</span>
+
+    <span class="k">if</span> <span class="p">(</span><span class="nx">selection</span> <span class="o">==</span> <span class="s2">"picker-thmb"</span><span class="p">)</span> <span class="p">{</span>
+        <span class="c1">// To downscale a selected image,</span>
+        <span class="c1">// Camera.EncodingType (e.g., JPEG) must match the selected image type.</span>
+        <span class="nx">options</span><span class="p">.</span><span class="nx">targetHeight</span> <span class="o">=</span> <span class="mi">100</span><span class="p">;</span>
+        <span class="nx">options</span><span class="p">.</span><span class="nx">targetWidth</span> <span class="o">=</span> <span class="mi">100</span><span class="p">;</span>
+    <span class="p">}</span>
+
+    <span class="nx">navigator</span><span class="p">.</span><span class="nx">camera</span><span class="p">.</span><span class="nx">getPicture</span><span class="p">(</span><span class="kd">function</span> <span class="nx">cameraSuccess</span><span class="p">(</span><span class="nx">imageUri</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// Do something with image</span>
+
+    <span class="p">},</span> <span class="kd">function</span> <span class="nx">cameraError</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
+        <span class="nx">console</span><span class="p">.</span><span class="nx">debug</span><span class="p">(</span><span class="s2">"Unable to obtain picture: "</span> <span class="o">+</span> <span class="nx">error</span><span class="p">,</span> <span class="s2">"app"</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="nx">options</span><span class="p">);</span>
+<span class="p">}</span>
+</code></pre></div>
+<h2>Take a picture and get a FileEntry Object <a name="convert"></a></h2>
+
+<p>If you want to do something like copy the image to another location, or upload it somewhere using the FileTransfer plugin, you need to get a FileEntry object for the returned picture. To do that, call <code>window.resolveLocalFileSystemURL</code> on the file URI returned by the Camera app. If you need to use a FileEntry object, set the <code>destinationType</code> to <code>Camera.DestinationType.FILE_URI</code> in your CameraOptions object (this is also the default value).</p>
+
+<blockquote>
+<p><em>Note</em> You need the <a href="https://www.npmjs.com/package/cordova-plugin-file">File plugin</a> to call <code>window.resolveLocalFileSystemURL</code>.</p>
+</blockquote>
+
+<p>Here is the call to <code>window.resolveLocalFileSystemURL</code>. The image URI is passed to this function from the success callback of <code>getPicture</code>. The success handler of <code>resolveLocalFileSystemURL</code> receives the FileEntry object.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">getFileEntry</span><span class="p">(</span><span class="nx">imgUri</span><span class="p">)</span> <span class="p">{</span>
+    <span class="nb">window</span><span class="p">.</span><span class="nx">resolveLocalFileSystemURL</span><span class="p">(</span><span class="nx">imgUri</span><span class="p">,</span> <span class="kd">function</span> <span class="nx">success</span><span class="p">(</span><span class="nx">fileEntry</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// Do something with the FileEntry object, like write to it, upload it, etc.</span>
+        <span class="c1">// writeFile(fileEntry, imgUri);</span>
+        <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">"got file: "</span> <span class="o">+</span> <span class="nx">fileEntry</span><span class="p">.</span><span class="nx">fullPath</span><span class="p">);</span>
+        <span class="c1">// displayFileData(fileEntry.nativeURL, "Native URL");</span>
+
+    <span class="p">},</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
+      <span class="c1">// If don't get the FileEntry (which may happen when testing</span>
+      <span class="c1">// on some emulators), copy to a new FileEntry.</span>
+        <span class="nx">createNewFileEntry</span><span class="p">(</span><span class="nx">imgUri</span><span class="p">);</span>
+    <span class="p">});</span>
+<span class="p">}</span>
+</code></pre></div>
+<p>In the example shown in the preceding code, you call the app&#39;s <code>createNewFileEntry</code> function if you don&#39;t get a valid FileEntry object. The image URI returned from the Camera app should result in a valid FileEntry, but platform behavior on some emulators may be different for files returned from the file picker.</p>
+
+<blockquote>
+<p><em>Note</em> To see an example of writing to a FileEntry, see the <a href="https://www.npmjs.com/package/cordova-plugin-file">File plugin README</a>.</p>
+</blockquote>
+
+<p>The code shown here creates a file in your app&#39;s cache (in sandboxed storage) named <code>tempFile.jpeg</code>. With the new FileEntry object, you can copy the image to the file or do something else like upload it.</p>
+<div class="highlight"><pre><code class="language-js" data-lang="js"><span class="kd">function</span> <span class="nx">createNewFileEntry</span><span class="p">(</span><span class="nx">imgUri</span><span class="p">)</span> <span class="p">{</span>
+    <span class="nb">window</span><span class="p">.</span><span class="nx">resolveLocalFileSystemURL</span><span class="p">(</span><span class="nx">cordova</span><span class="p">.</span><span class="nx">file</span><span class="p">.</span><span class="nx">cacheDirectory</span><span class="p">,</span> <span class="kd">function</span> <span class="nx">success</span><span class="p">(</span><span class="nx">dirEntry</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// JPEG file</span>
+        <span class="nx">dirEntry</span><span class="p">.</span><span class="nx">getFile</span><span class="p">(</span><span class="s2">"tempFile.jpeg"</span><span class="p">,</span> <span class="p">{</span> <span class="na">create</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> <span class="na">exclusive</span><span class="p">:</span> <span class="kc">false</span> <span class="p">},</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">fileEntry</span><span class="p">)</span> <span class="p">{</span>
+
+            <span class="c1">// Do something with it, like write to it, upload it, etc.</span>
+            <span class="c1">// writeFile(fileEntry, imgUri);</span>
+            <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">"got file: "</span> <span class="o">+</span> <span class="nx">fileEntry</span><span class="p">.</span><span class="nx">fullPath</span><span class="p">);</span>
+            <span class="c1">// displayFileData(fileEntry.fullPath, "File copied to");</span>
+
+        <span class="p">},</span> <span class="nx">onErrorCreateFile</span><span class="p">);</span>
+
+    <span class="p">},</span> <span class="nx">onErrorResolveUrl</span><span class="p">);</span>
+<span class="p">}</span>
+</code></pre></div>
 
                 </div>
             </div>



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


Mime
View raw message