You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2020/04/17 13:42:55 UTC

svn commit: r1876666 - in /cordova/site/public: docs/en/dev/guide/platforms/android/index.html docs/en/dev/reference/cordova-plugin-inappbrowser/index.html docs/en/dev/reference/cordova-plugin-vibration/index.html feed.xml

Author: janpio
Date: Fri Apr 17 13:42:54 2020
New Revision: 1876666

URL: http://svn.apache.org/viewvc?rev=1876666&view=rev
Log:
Updated docs

Modified:
    cordova/site/public/docs/en/dev/guide/platforms/android/index.html
    cordova/site/public/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html
    cordova/site/public/docs/en/dev/reference/cordova-plugin-vibration/index.html
    cordova/site/public/feed.xml

Modified: cordova/site/public/docs/en/dev/guide/platforms/android/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/dev/guide/platforms/android/index.html?rev=1876666&r1=1876665&r2=1876666&view=diff
==============================================================================
--- cordova/site/public/docs/en/dev/guide/platforms/android/index.html (original)
+++ cordova/site/public/docs/en/dev/guide/platforms/android/index.html Fri Apr 17 13:42:54 2020
@@ -2650,7 +2650,7 @@ should be updated:</p>
 <ol>
 <li>Set the <code>JAVA_HOME</code> environment variable to the location of your JDK
 installation</li>
-<li>Set the <code>ANDROID_HOME</code> environment variable to the location of your Android
+<li>Set the <code>ANDROID_SDK_ROOT</code> environment variable to the location of your Android
 SDK installation</li>
 <li>It is also recommended that you add the Android SDK&#39;s <code>tools</code>, <code>tools/bin</code>,
 and <code>platform-tools</code> directories to your <code>PATH</code></li>
@@ -2661,7 +2661,7 @@ and <code>platform-tools</code> director
 <p>On a Mac or Linux, you can use a text editor to create or modify the
 <code>~/.bash_profile</code> file. To set an environment variable, add a line that uses
 <code>export</code> like so (substitute the path with your local installation):</p>
-<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">export </span><span class="nv">ANDROID_HOME</span><span class="o">=</span>/Development/android-sdk/
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">export </span><span class="nv">ANDROID_SDK_ROOT</span><span class="o">=</span>/Development/android-sdk/
 </code></pre></div>
 <p>To update your <code>PATH</code>, add a line resembling the following (substitute the paths
 with your local Android SDK installation&#39;s location):</p>

Modified: cordova/site/public/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html?rev=1876666&r1=1876665&r2=1876666&view=diff
==============================================================================
--- cordova/site/public/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html (original)
+++ cordova/site/public/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html Fri Apr 17 13:42:54 2020
@@ -2596,6 +2596,10 @@ for the <code>window.open()</code> funct
 InAppBrowser window, by replacing window.open:</p>
 <div class="highlight"><pre><code class="language-" data-lang="">window.open = cordova.InAppBrowser.open;
 </code></pre></div>
+<p>If you change the browsers <code>window.open</code> function this way, it can have unintended side
+effects (especially if this plugin is included only as a dependency of another
+plugin).</p>
+
 <p>The InAppBrowser window behaves like a standard web browser,
 and can&#39;t access Cordova APIs. For this reason, the InAppBrowser is recommended
 if you need to load third-party (untrusted) content, instead of loading that
@@ -2605,20 +2609,6 @@ whitelist, nor is opening links in the s
 <p>The InAppBrowser provides by default its own GUI controls for the user (back,
 forward, done).</p>
 
-<p>For backwards compatibility, this plugin also hooks <code>window.open</code>.
-However, the plugin-installed hook of <code>window.open</code> can have unintended side
-effects (especially if this plugin is included only as a dependency of another
-plugin).  The hook of <code>window.open</code> will be removed in a future major release.
-Until the hook is removed from the plugin, apps can manually restore the default
-behaviour:</p>
-<div class="highlight"><pre><code class="language-" data-lang="">delete window.open // Reverts the call back to its prototype's default
-</code></pre></div>
-<p>Although <code>window.open</code> is in the global scope, InAppBrowser is not available until after the <code>deviceready</code> event.</p>
-<div class="highlight"><pre><code class="language-" data-lang="">document.addEventListener("deviceready", onDeviceReady, false);
-function onDeviceReady() {
-    console.log("window.open works well");
-}
-</code></pre></div>
 <h2>Installation</h2>
 <div class="highlight"><pre><code class="language-" data-lang="">cordova plugin add cordova-plugin-inappbrowser
 </code></pre></div>

Modified: cordova/site/public/docs/en/dev/reference/cordova-plugin-vibration/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/dev/reference/cordova-plugin-vibration/index.html?rev=1876666&r1=1876665&r2=1876666&view=diff
==============================================================================
--- cordova/site/public/docs/en/dev/reference/cordova-plugin-vibration/index.html (original)
+++ cordova/site/public/docs/en/dev/reference/cordova-plugin-vibration/index.html Fri Apr 17 13:42:54 2020
@@ -2580,13 +2580,9 @@
 
 <h1>cordova-plugin-vibration</h1>
 
-<p>This plugin aligns with the W3C vibration specification http://www.w3.org/TR/vibration/</p>
+<p>This plugin provides a way to vibrate the device. Its API aligns with the W3C vibration specification at http://www.w3.org/TR/vibration/</p>
 
-<p>This plugin provides a way to vibrate the device.</p>
-
-<p>This plugin defines global objects including <code>navigator.vibrate</code>.</p>
-
-<p>Although in the global scope, they are not available until after the <code>deviceready</code> event.</p>
+<p>The plugin defines a global object/method <code>navigator.vibrate</code>. Although in the global scope, it is not available until after the <code>deviceready</code> event.</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s2">"deviceready"</span><span class="p">,</span> <span class="nx">onDeviceReady</span><span class="p">,</span> <span class="kc">false</span><span class="p">);</span>
 <span class="kd">function</span> <span class="nx">onDeviceReady</span><span class="p">()</span> <span class="p">{</span>
     <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">);</span>
@@ -2597,19 +2593,16 @@
 </span></code></pre></div>
 <h2>Supported Platforms</h2>
 
-<p>navigator.vibrate</p>
-
 <ul>
-<li>Android</li>
 <li>iOS</li>
-<li>Windows</li>
+<li>Windows Phone</li>
+<li>Android<br>
+The Android webview (API level 19 and up) supports the <a href="https://www.w3.org/TR/vibration/">W3C Vibration API</a> natively, so no Android specific implementation in this plugin is necessary.</li>
 </ul>
 
-<p>The Android webview (API level 19 and up) supports the <a href="https://www.w3.org/TR/vibration/">W3C Vibration API</a> natively and therefore, the Android specific implementation of this plugin has been dropped.</p>
-
-<h2>vibrate</h2>
+<h2>navigator.vibrate</h2>
 
-<p>This function has three different functionalities based on parameters passed to it.</p>
+<p>This function has three different functionalities based on parameters passed to it:</p>
 
 <h3>Standard vibrate</h3>
 
@@ -2619,7 +2612,9 @@
 <p>or</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">([</span><span class="nx">time</span><span class="p">])</span>
 </code></pre></div>
-<p>-<strong>time</strong>: Milliseconds to vibrate the device. <em>(Number)</em></p>
+<ul>
+<li><strong>time</strong>: Milliseconds to vibrate the device. <em>(Number)</em></li>
+</ul>
 
 <h4>Example</h4>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="c1">// Vibrate for 3 seconds</span>
@@ -2628,22 +2623,33 @@
 <span class="c1">// Vibrate for 3 seconds</span>
 <span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">([</span><span class="mi">3000</span><span class="p">]);</span>
 </code></pre></div>
-<h3>Android Quirks</h3>
-
-<p>Calls to <code>navigator.vibrate</code> will immediately return <code>false</code> if user hasn&#39;t tapped on the frame or any embedded frame yet. Please checkout https://issues.apache.org/jira/browse/CB-14022 for more information.</p>
+<h4>Quirks</h4>
 
-<h4>iOS Quirks</h4>
+<h5>iOS Quirks</h5>
 
 <ul>
 <li><p><strong>time</strong>: Ignores the specified time and vibrates for a pre-set amount of time.</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">(</span><span class="mi">3000</span><span class="p">);</span> <span class="c1">// 3000 is ignored</span>
-</code></pre></div>
-<h4>Windows Quirks</h4></li>
-<li><p><strong>time</strong>: Max time is 5000ms (5s) and min time is 1ms</p></li>
+</code></pre></div></li>
 </ul>
+
+<h5>Windows Phone Quirks</h5>
+
+<ul>
+<li><p><strong>time</strong>: Max time is 5000ms (5s) and min time is 1ms</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">(</span><span class="mi">8000</span><span class="p">);</span> <span class="c1">// will be truncated to 5000</span>
-</code></pre></div>
-<h3>Vibrate with a pattern (Android and Windows only)</h3>
+</code></pre></div></li>
+</ul>
+
+<h5>Android Quirks</h5>
+
+<blockquote>
+<p>Calls to <code>navigator.vibrate</code> will immediately return <code>false</code> if user hasn&#39;t tapped on the frame or any embedded frame yet. </p>
+</blockquote>
+
+<p>See https://www.chromestatus.com/feature/5644273861001216</p>
+
+<h3>Vibrate with a pattern</h3>
 
 <p>Vibrates the device with a given pattern</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">(</span><span class="nx">pattern</span><span class="p">);</span>
@@ -2660,7 +2666,13 @@
 <span class="c1">// Vibrate for 5 seconds</span>
 <span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">([</span><span class="mi">1000</span><span class="p">,</span> <span class="mi">1000</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span> <span class="mi">1000</span><span class="p">,</span> <span class="mi">5000</span><span class="p">]);</span>
 </code></pre></div>
-<h3>Cancel vibration (not supported in iOS)</h3>
+<h4>Quirks</h4>
+
+<ul>
+<li>Not supported on iOS</li>
+</ul>
+
+<h3>Cancel vibration</h3>
 
 <p>Immediately cancels any currently running vibration.</p>
 <div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nb">navigator</span><span class="p">.</span><span class="nx">vibrate</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
@@ -2673,6 +2685,12 @@
 </code></pre></div>
 <p>Passing in a parameter of 0, an empty array, or an array with one element of value 0 will cancel any vibrations.</p>
 
+<h4>Quirks</h4>
+
+<ul>
+<li>Not supported on iOS</li>
+</ul>
+
 
             </div>
         </div>

Modified: cordova/site/public/feed.xml
URL: http://svn.apache.org/viewvc/cordova/site/public/feed.xml?rev=1876666&r1=1876665&r2=1876666&view=diff
==============================================================================
--- cordova/site/public/feed.xml (original)
+++ cordova/site/public/feed.xml Fri Apr 17 13:42:54 2020
@@ -6,8 +6,8 @@
 </description>
     <link>https://cordova.apache.org/</link>
     <atom:link href="https://cordova.apache.org/feed.xml" rel="self" type="application/rss+xml"/>
-    <pubDate>Mon, 13 Apr 2020 13:17:27 +0000</pubDate>
-    <lastBuildDate>Mon, 13 Apr 2020 13:17:27 +0000</lastBuildDate>
+    <pubDate>Fri, 17 Apr 2020 13:22:43 +0000</pubDate>
+    <lastBuildDate>Fri, 17 Apr 2020 13:22:43 +0000</lastBuildDate>
     <generator>Jekyll v2.5.3</generator>
     
       <item>



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