cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject cordova-plugin-file git commit: Make Android default persistent file location internal
Date Thu, 13 Aug 2015 00:28:46 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 19c8a79a6 -> e281490ad


Make Android default persistent file location internal


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/e281490a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/e281490a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/e281490a

Branch: refs/heads/master
Commit: e281490adb4413308f6e48e144a7df7cf0a30cb5
Parents: 19c8a79
Author: Simon MacDonald <simon.macdonald@gmail.com>
Authored: Mon Jul 27 16:05:13 2015 -0400
Committer: Simon MacDonald <simon.macdonald@gmail.com>
Committed: Wed Aug 12 19:20:47 2015 -0400

----------------------------------------------------------------------
 README.md                  |  6 +++---
 package.json               |  2 +-
 plugin.xml                 | 19 ++++++++++++++++++-
 src/android/FileUtils.java |  2 +-
 4 files changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/e281490a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index c916930..ffb4e0b 100644
--- a/README.md
+++ b/README.md
@@ -214,13 +214,13 @@ application's `config.xml` file. To do this, add one of these two lines
to
 
     <preference name="AndroidPersistentFileLocation" value="Compatibility" />
 
-Without this line, the File plugin will use `Compatibility` as the default. If
+Without this line, the File plugin will use `Internal` as the default. If
 a preference tag is present, and is not one of these values, the application
 will not start.
 
 If your application has previously been shipped to users, using an older (pre-
-1.0) version of this plugin, and has stored files in the persistent filesystem,
-then you should set the preference to `Compatibility`. Switching the location to
+3.0.0) version of this plugin, and has stored files in the persistent filesystem,
+then you should set the preference to `Compatibility` if your config.xml does not specify
a location for the persistent filesystem. Switching the location to
 "Internal" would mean that existing users who upgrade their application may be
 unable to access their previously-stored files, depending on their device.
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/e281490a/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 21d70fd..3fc292a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-file",
-  "version": "2.1.1-dev",
+  "version": "3.0.0",
   "description": "Cordova File Plugin",
   "cordova": {
     "id": "cordova-plugin-file",

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/e281490a/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index c7f2b69..7296f95 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -21,7 +21,7 @@
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
 xmlns:android="http://schemas.android.com/apk/res/android"
            id="cordova-plugin-file"
-      version="2.1.1-dev">
+      version="3.0.0">
     <name>File</name>
     <description>Cordova File Plugin</description>
     <license>Apache 2.0</license>
@@ -104,6 +104,23 @@ xmlns:android="http://schemas.android.com/apk/res/android"
     <js-module src="www/resolveLocalFileSystemURI.js" name="resolveLocalFileSystemURI">
         <merges target="window" />
     </js-module>
+  
+    <config-file target="config.xml" parent="/*">
+        <preference name="AndroidPersistentFileLocation" value="Internal" />
+    </config-file>
+  
+    <info>
+The Android Persistent storage location now defaults to "Internal". Please check this plugins
README to see if you application needs any changes in its config.xml.
+      
+If this is a new application no changes are required.
+      
+If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation"
you may need to add:
+      
+      "&lt;preference name="AndroidPersistentFileLocation" value="Compatibility" /&gt;"
+      
+to config.xml in order for the application to find previously stored files.
+      
+    </info>
 
     <!-- android -->
     <platform name="android">

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/e281490a/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index 64d8a3e..c90a61d 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -153,7 +153,7 @@ public class FileUtils extends CordovaPlugin {
     	Activity activity = cordova.getActivity();
     	String packageName = activity.getPackageName();
 
-        String location = preferences.getString("androidpersistentfilelocation", "compatibility");
+        String location = preferences.getString("androidpersistentfilelocation", "internal");
 
     	tempRoot = activity.getCacheDir().getAbsolutePath();
     	if ("internal".equalsIgnoreCase(location)) {


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


Mime
View raw message