You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by gi...@apache.org on 2021/08/17 11:44:48 UTC
[cordova-docs] branch asf-site updated: Deploying to asf-site from @ apache/cordova-docs@4d887aa4dc06335be5a796fb4cb44995681faf70 🚀
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git
The following commit(s) were added to refs/heads/asf-site by this push:
new b8e3a82 Deploying to asf-site from @ apache/cordova-docs@4d887aa4dc06335be5a796fb4cb44995681faf70 🚀
b8e3a82 is described below
commit b8e3a824df3269b8af55c62b47af6e0cbfb6910d
Author: erisu <er...@users.noreply.github.com>
AuthorDate: Tue Aug 17 11:44:43 2021 +0000
Deploying to asf-site from @ apache/cordova-docs@4d887aa4dc06335be5a796fb4cb44995681faf70 🚀
---
docs/en/dev/config_ref/index.html | 5 +++++
docs/en/dev/guide/platforms/android/upgrade.html | 22 ++++++++++++++++++++++
feed.xml | 4 ++--
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/docs/en/dev/config_ref/index.html b/docs/en/dev/config_ref/index.html
index d6fd374..c3eca2a 100644
--- a/docs/en/dev/config_ref/index.html
+++ b/docs/en/dev/config_ref/index.html
@@ -2795,6 +2795,10 @@ and will be indicated as such.</p>
<td><em>Default: singleTop</em> <br/> Allowed values: standard, singleTop, singleTask, singleInstance <br/> Sets the Activity android:launchMode attribute. This changes what happens when the app is launched from app icon or intent and is already running.</td>
</tr>
<tr>
+<td>AndroidInsecureFileModeEnabled(boolean) <br/> <mark>Android</mark></td>
+<td><em>Default: false</em> <br/> If set to <code>true</code> loading <code>file:///</code> URLs is allowed. <strong>Note</strong>: Enabling this setting allows malicious scripts loaded in a file:// context to launch cross-site scripting attacks, either accessing arbitrary local files including WebView cookies, app private data or even credentials used on arbitrary web sites.</td>
+</tr>
+<tr>
<td>android-maxSdkVersion(integer) <br/> <mark>Android</mark></td>
<td><em>Default: Not Specified</em> <br/> Sets the <code>maxSdkVersion</code> attribute of the <code><uses-sdk></code> tag in the project's <code>AndroidManifest.xml</code> (see <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html">here</a>).</td>
</tr>
@@ -3075,6 +3079,7 @@ and will be indicated as such.</p>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"ShowTitle"</span> <span class="na">value=</span><span class="s">"true"</span><span class="nt">/></span>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"LogLevel"</span> <span class="na">value=</span><span class="s">"VERBOSE"</span><span class="nt">/></span>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"AndroidLaunchMode"</span> <span class="na">value=</span><span class="s">"singleTop"</span><span class="nt">/></span>
+<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"AndroidInsecureFileModeEnabled"</span> <span class="na">value=</span><span class="s">"true"</span> <span class="nt">/></span>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"DefaultVolumeStream"</span> <span class="na">value=</span><span class="s">"call"</span> <span class="nt">/></span>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"OverrideUserAgent"</span> <span class="na">value=</span><span class="s">"Mozilla/5.0 My Browser"</span> <span class="nt">/></span>
<span class="nt"><preference</span> <span class="na">name=</span><span class="s">"AppendUserAgent"</span> <span class="na">value=</span><span class="s">"My Browser"</span> <span class="nt">/></span>
diff --git a/docs/en/dev/guide/platforms/android/upgrade.html b/docs/en/dev/guide/platforms/android/upgrade.html
index 463df3f..56b7b84 100644
--- a/docs/en/dev/guide/platforms/android/upgrade.html
+++ b/docs/en/dev/guide/platforms/android/upgrade.html
@@ -2423,6 +2423,28 @@ Most of these instructions apply to projects created with an older set
of command-line tools that precede the <code>cordova</code> CLI utility. See <a href="../../cli/index.html">The Command-Line Interface</a> for information how to update the
version of the CLI.</p>
+<h2>Upgrading to 10.x.x</h2>
+
+<p>The best way to upgrade to 10.X.X is to simply remove the Android platform from
+your project and re-add it with the new version. For example,</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash">cordova platform remove android
+cordova platform add android@10.X.X
+</code></pre></div>
+<p>If you use the above method, be aware that any changes you made to the android
+platform folder will be lost (editing the contents of this folder is
+discouraged).</p>
+
+<h3>Breaking changes</h3>
+
+<p>Version 10.0.0 introduces a signinificant change how URLs are loaded within the app.
+Prior versions load the apps web files like <code>index.html</code> via the file protocol.
+Which means the app starts with the URL <code>file:///android_asset/www/index.html</code>. Loading <code>file:///</code> URLs is considered insecure
+and <a href="https://developer.android.com/reference/android/webkit/WebSettings#setAllowUniversalAccessFromFileURLs(boolean)">Android has deprecated support</a>.
+Cordova Android 10.0.0 now uses an Android API called <code>WebViewAssetLoader</code> to load web content via the HTTP(S) scheme (<code>https://localhost</code>) by default.
+Therefore the app now starts with the URL <code>https://localhost/</code> instead of <code>file:///android_asset/www/index.html</code>. Because this is a new origin you might encouter data loss and you need to migrate your web data (Localstorage, IndexedDB etc).</p>
+
+<p>You can use the <code>config.xml</code> preference <code><preference name="AndroidInsecureFileModeEnabled" value="true" /></code> to opt-out of the new WebViewAssetLoader and switch back to file URLs.</p>
+
<h2>Upgrading to 7.X.X</h2>
<p>The best way to upgrade to 7.X.X is to simply remove the Android platform from
diff --git a/feed.xml b/feed.xml
index ca1e44b..b40ddda 100644
--- a/feed.xml
+++ b/feed.xml
@@ -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>Tue, 17 Aug 2021 10:38:40 +0000</pubDate>
- <lastBuildDate>Tue, 17 Aug 2021 10:38:40 +0000</lastBuildDate>
+ <pubDate>Tue, 17 Aug 2021 11:14:59 +0000</pubDate>
+ <lastBuildDate>Tue, 17 Aug 2021 11:14:59 +0000</lastBuildDate>
<generator>Jekyll v3.9.1</generator>
<item>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org