Skip to content

TagSpaces is an offline, open source, document manager with tagging support

cordova android updates (#1265)

Stanimird2a996eeb2cb
diff --git a/cordova/config.xml b/cordova/config.xml
index 518292eeb..3daec7106 100644
--- a/cordova/config.xml
+++ b/cordova/config.xml
@@ -19,6 +19,7 @@
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="27" />
+ <preference name="AndroidXEnabled" value="true" />
<icon density="mdpi" src="res/icon/android/mipmap-mdpi/ic_launcher.png" />
<icon density="hdpi" src="res/icon/android/mipmap-hdpi/ic_launcher.png" />
<icon density="xhdpi" src="res/icon/android/mipmap-xhdpi/ic_launcher.png" />
diff --git a/cordova/package.json b/cordova/package.json
index c417ebf7d..f113174f1 100644
--- a/cordova/package.json
+++ b/cordova/package.json
@@ -13,7 +13,7 @@
"cordova-plugin-background-mode": "^0.7.3",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-file": "6.0.2",
- "cordova-plugin-file-opener2": "^3.0.3",
+ "cordova-plugin-file-opener2": "^3.0.5",
"cordova-plugin-whitelist": "^1.3.4",
"es6-promise-plugin": "^4.2.2"
},
@@ -34,7 +34,8 @@
},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
- }
+ },
+ "cordova-plugin-androidx-adapter": {}
},
"platforms": [
"ios",
@@ -45,6 +46,7 @@
"@globules-io/cordova-plugin-ios-xhr": "^1.0.4",
"bamboo.cordova.plugin.downloader": "git+https://github.com/sytolk/cordova-plugin-downloader.git",
"cordova-android": "^9.0.0",
- "cordova-ios": "^6.1.0"
+ "cordova-ios": "^6.1.0",
+ "cordova-plugin-androidx-adapter": "^1.1.3"
}
-}
\ No newline at end of file
+}
diff --git a/cordova/platforms/android/android.json b/cordova/platforms/android/android.json
index 7a0dcb0fd..9737dc75b 100644
--- a/cordova/platforms/android/android.json
+++ b/cordova/platforms/android/android.json
@@ -5,109 +5,109 @@
},
"config_munge": {
"files": {
- "AndroidManifest.xml": {
+ "res/xml/config.xml": {
"parents": {
- "/manifest": [
+ "/*": [
{
- "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
+ "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
"count": 1
},
{
- "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+ "xml": "<feature name=\"BackgroundMode\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundMode\" /></feature>",
"count": 1
},
{
- "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />",
+ "xml": "<feature name=\"BackgroundModeExt\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundModeExt\" /></feature>",
"count": 1
- }
- ],
- "/manifest/application": [
+ },
{
- "xml": "<service android:name=\"de.appplant.cordova.plugin.background.ForegroundService\" />",
+ "xml": "<preference name=\"KeepRunning\" value=\"true\" />",
"count": 1
},
{
- "xml": "<provider android:authorities=\"${applicationId}.sharing.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"nl.xservices.plugins.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/sharing_paths\" /></provider>",
+ "xml": "<feature name=\"Camera\"><param name=\"android-package\" value=\"org.apache.cordova.camera.CameraLauncher\" /></feature>",
"count": 1
- }
- ],
- "/*": [
+ },
{
- "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
- "count": 3
+ "xml": "<feature name=\"File\"><param name=\"android-package\" value=\"org.apache.cordova.file.FileUtils\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "count": 1
},
{
- "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
+ "xml": "<allow-navigation href=\"cdvfile:*\" />",
"count": 1
},
{
- "xml": "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />",
+ "xml": "<feature name=\"FileOpener2\"><param name=\"android-package\" value=\"io.github.pwlin.cordova.plugins.fileopener2.FileOpener2\" /></feature>",
"count": 1
- }
- ],
- "application": [
+ },
{
- "xml": "<provider android:authorities=\"${applicationId}.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"org.apache.cordova.camera.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/camera_provider_paths\" /></provider>",
+ "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1
},
{
- "xml": "<provider android:authorities=\"${applicationId}.fileOpener2.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"io.github.pwlin.cordova.plugins.fileopener2.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/opener_paths\" /></provider>",
+ "xml": "<feature name=\"SocialSharing\"><param name=\"android-package\" value=\"nl.xservices.plugins.SocialSharing\" /></feature>",
"count": 1
- }
- ],
- "/*/application": [
+ },
{
- "xml": "<receiver android:enabled=\"true\" android:name=\"nl.xservices.plugins.ShareChooserPendingIntent\"><intent-filter><action android:name=\"android.intent.action.SEND\" /></intent-filter></receiver>",
+ "xml": "<feature name=\"Downloader\"><param name=\"android-package\" value=\"com.whebcraft.android.plugin.Downloader\" /></feature>",
"count": 1
}
]
}
},
- "res/xml/config.xml": {
+ "AndroidManifest.xml": {
"parents": {
- "/*": [
+ "/manifest/application": [
{
- "xml": "<feature name=\"Downloader\"><param name=\"android-package\" value=\"com.whebcraft.android.plugin.Downloader\" /></feature>",
+ "xml": "<service android:name=\"de.appplant.cordova.plugin.background.ForegroundService\" />",
"count": 1
},
{
- "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
+ "xml": "<provider android:authorities=\"${applicationId}.sharing.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"nl.xservices.plugins.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/sharing_paths\" /></provider>",
"count": 1
- },
+ }
+ ],
+ "/manifest": [
{
- "xml": "<feature name=\"BackgroundMode\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundMode\" /></feature>",
+ "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />",
"count": 1
},
{
- "xml": "<feature name=\"BackgroundModeExt\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundModeExt\" /></feature>",
+ "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
"count": 1
},
{
- "xml": "<preference name=\"KeepRunning\" value=\"true\" />",
+ "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
"count": 1
- },
+ }
+ ],
+ "/*": [
{
- "xml": "<feature name=\"Camera\"><param name=\"android-package\" value=\"org.apache.cordova.camera.CameraLauncher\" /></feature>",
- "count": 1
+ "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+ "count": 3
},
{
- "xml": "<feature name=\"File\"><param name=\"android-package\" value=\"org.apache.cordova.file.FileUtils\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
"count": 1
},
{
- "xml": "<allow-navigation href=\"cdvfile:*\" />",
+ "xml": "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />",
"count": 1
- },
+ }
+ ],
+ "application": [
{
- "xml": "<feature name=\"FileOpener2\"><param name=\"android-package\" value=\"io.github.pwlin.cordova.plugins.fileopener2.FileOpener2\" /></feature>",
+ "xml": "<provider android:authorities=\"${applicationId}.cordova.plugin.camera.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"org.apache.cordova.camera.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/camera_provider_paths\" /></provider>",
"count": 1
},
{
- "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
+ "xml": "<provider android:authorities=\"${applicationId}.fileOpener2.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"io.github.pwlin.cordova.plugins.fileopener2.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/opener_paths\" /></provider>",
"count": 1
- },
+ }
+ ],
+ "/*/application": [
{
- "xml": "<feature name=\"SocialSharing\"><param name=\"android-package\" value=\"nl.xservices.plugins.SocialSharing\" /></feature>",
+ "xml": "<receiver android:enabled=\"true\" android:name=\"nl.xservices.plugins.ShareChooserPendingIntent\"><intent-filter><action android:name=\"android.intent.action.SEND\" /></intent-filter></receiver>",
"count": 1
}
]
@@ -116,9 +116,6 @@
}
},
"installed_plugins": {
- "com.whebcraft.cordova.plugin.downloader": {
- "PACKAGE_NAME": "org.tagspaces.mobile"
- },
"cordova-plugin-device": {
"PACKAGE_NAME": "org.tagspaces.mobile"
},
@@ -143,20 +140,17 @@
"PACKAGE_NAME": "org.tagspaces.mobile"
},
"cordova-plugin-x-socialsharing": {
- "ANDROID_SUPPORT_V4_VERSION": "24.1.1+",
+ "PACKAGE_NAME": "org.tagspaces.mobile"
+ },
+ "cordova-plugin-androidx-adapter": {
+ "PACKAGE_NAME": "org.tagspaces.mobile"
+ },
+ "com.whebcraft.cordova.plugin.downloader": {
"PACKAGE_NAME": "org.tagspaces.mobile"
}
},
"dependent_plugins": {},
"modules": [
- {
- "id": "com.whebcraft.cordova.plugin.downloader.Downloader",
- "file": "plugins/com.whebcraft.cordova.plugin.downloader/www/Downloader.js",
- "pluginId": "com.whebcraft.cordova.plugin.downloader",
- "clobbers": [
- "plugins.Downloader"
- ]
- },
{
"id": "cordova-plugin-device.device",
"file": "plugins/cordova-plugin-device/www/device.js",
@@ -400,17 +394,26 @@
"clobbers": [
"window.plugins.socialsharing"
]
+ },
+ {
+ "id": "com.whebcraft.cordova.plugin.downloader.Downloader",
+ "file": "plugins/com.whebcraft.cordova.plugin.downloader/www/Downloader.js",
+ "pluginId": "com.whebcraft.cordova.plugin.downloader",
+ "clobbers": [
+ "plugins.Downloader"
+ ]
}
],
"plugin_metadata": {
- "com.whebcraft.cordova.plugin.downloader": "0.1.0",
"cordova-plugin-device": "2.0.3",
"cordova-plugin-background-mode": "0.7.3",
- "cordova-plugin-camera": "4.1.0",
+ "cordova-plugin-camera": "5.0.1",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-opener2": "3.0.4",
"cordova-plugin-whitelist": "1.3.4",
"es6-promise-plugin": "4.2.2",
- "cordova-plugin-x-socialsharing": "5.6.8"
+ "cordova-plugin-x-socialsharing": "6.0.2",
+ "cordova-plugin-androidx-adapter": "1.1.3",
+ "com.whebcraft.cordova.plugin.downloader": "0.1.0"
}
}
diff --git a/cordova/platforms/android/app/build.gradle b/cordova/platforms/android/app/build.gradle
index a452429f5..28e3e6401 100644
--- a/cordova/platforms/android/app/build.gradle
+++ b/cordova/platforms/android/app/build.gradle
@@ -351,8 +351,7 @@ dependencies {
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
- implementation "com.android.support:support-v4:27.+"
- implementation "com.android.support:support-v4:24.1.1+"
+ implementation "androidx.legacy:legacy-support-v4:1.0.0"
// SUB-PROJECT DEPENDENCIES END
}
diff --git a/cordova/platforms/android/app/src/main/AndroidManifest.xml b/cordova/platforms/android/app/src/main/AndroidManifest.xml
index 50387004f..3dc962851 100644
--- a/cordova/platforms/android/app/src/main/AndroidManifest.xml
+++ b/cordova/platforms/android/app/src/main/AndroidManifest.xml
@@ -10,7 +10,7 @@
</intent-filter>
</activity>
<service android:name="de.appplant.cordova.plugin.background.ForegroundService" />
- <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="org.apache.cordova.camera.FileProvider">
+ <provider android:authorities="${applicationId}.cordova.plugin.camera.provider" android:exported="false" android:grantUriPermissions="true" android:name="org.apache.cordova.camera.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/camera_provider_paths" />
</provider>
<provider android:authorities="${applicationId}.fileOpener2.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
@@ -25,8 +25,8 @@
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/sharing_paths" />
</provider>
</application>
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
</manifest>
diff --git a/cordova/platforms/android/app/src/main/java/io/github/pwlin/cordova/plugins/fileopener2/FileProvider.java b/cordova/platforms/android/app/src/main/java/io/github/pwlin/cordova/plugins/fileopener2/FileProvider.java
index c9d49844c..b9f6bc5ca 100644
--- a/cordova/platforms/android/app/src/main/java/io/github/pwlin/cordova/plugins/fileopener2/FileProvider.java
+++ b/cordova/platforms/android/app/src/main/java/io/github/pwlin/cordova/plugins/fileopener2/FileProvider.java
@@ -25,5 +25,5 @@ package io.github.pwlin.cordova.plugins.fileopener2;
/*
* http://stackoverflow.com/questions/40746144/error-with-duplicated-fileprovider-in-manifest-xml-with-cordova/41550634#41550634
*/
-public class FileProvider extends android.support.v4.content.FileProvider {
+public class FileProvider extends androidx.core.content.FileProvider {
}
diff --git a/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/FileProvider.java b/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/FileProvider.java
index cf05180cb..93dabc460 100644
--- a/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/FileProvider.java
+++ b/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/FileProvider.java
@@ -1,4 +1,4 @@
package nl.xservices.plugins;
-public class FileProvider extends android.support.v4.content.FileProvider {
-}
\ No newline at end of file
+public class FileProvider extends androidx.core.content.FileProvider {
+}
diff --git a/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java b/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java
index e72446f42..825a28ba7 100644
--- a/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java
+++ b/cordova/platforms/android/app/src/main/java/nl/xservices/plugins/SocialSharing.java
@@ -87,10 +87,10 @@ public class SocialSharing extends CordovaPlugin {
} else if (ACTION_SHARE_VIA_TWITTER_EVENT.equals(action)) {
return doSendIntent(callbackContext, args.getString(0), args.getString(1), args.getJSONArray(2), args.getString(3), "twitter", null, false, true);
} else if (ACTION_SHARE_VIA_FACEBOOK_EVENT.equals(action)) {
- return doSendIntent(callbackContext, args.getString(0), args.getString(1), args.isNull(3) ? args.getJSONArray(2) : null, args.getString(3), "com.facebook.katana", null, false, true, "com.facebook.composer.shareintent");
+ return doSendIntent(callbackContext, args.getString(0), args.getString(1), args.isNull(3) ? args.getJSONArray(2) : new JSONArray(), args.getString(3), "com.facebook.katana", null, false, true, "com.facebook.composer.shareintent");
} else if (ACTION_SHARE_VIA_FACEBOOK_WITH_PASTEMESSAGEHINT.equals(action)) {
this.pasteMessage = args.getString(4);
- return doSendIntent(callbackContext, args.getString(0), args.getString(1), args.isNull(3) ? args.getJSONArray(2) : null, args.getString(3), "com.facebook.katana", null, false, true, "com.facebook.composer.shareintent");
+ return doSendIntent(callbackContext, args.getString(0), args.getString(1), args.isNull(3) ? args.getJSONArray(2) : new JSONArray(), args.getString(3), "com.facebook.katana", null, false, true, "com.facebook.composer.shareintent");
} else if (ACTION_SHARE_VIA_WHATSAPP_EVENT.equals(action)) {
if (notEmpty(args.getString(4))) { // abid
return shareViaWhatsAppDirectly(callbackContext, args.getString(0), args.getString(1), args.getJSONArray(2), args.getString(3), args.getString(4));
@@ -440,6 +440,9 @@ public class SocialSharing extends CordovaPlugin {
}
}
saveFile(getBytes(connection.getInputStream()), dir, filename);
+ // update file type
+ String fileType = getMIMEType(image);
+ sendIntent.setType(fileType);
} else {
saveFile(getBytes(webView.getContext().getAssets().open(image)), dir, filename);
}
diff --git a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java
index 2eef0fa57..614935d19 100755
--- a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java
+++ b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CameraLauncher.java
@@ -21,6 +21,7 @@ package org.apache.cordova.camera;
import android.Manifest;
import android.app.Activity;
import android.content.ActivityNotFoundException;
+import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -34,10 +35,11 @@ import android.media.ExifInterface;
import android.media.MediaScannerConnection;
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
-import android.support.v4.content.FileProvider;
+import androidx.core.content.FileProvider;
import android.util.Base64;
import org.apache.cordova.BuildHelper;
@@ -51,7 +53,6 @@ import org.json.JSONException;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -69,7 +70,6 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private static final int DATA_URL = 0; // Return base64 encoded string
private static final int FILE_URI = 1; // Return file uri (content://media/external/images/media/2 for Android)
- private static final int NATIVE_URI = 2; // On Android, this is the same as FILE_URI
private static final int PHOTOLIBRARY = 0; // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
private static final int CAMERA = 1; // Take picture from camera
@@ -109,7 +109,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private int mQuality; // Compression quality hint (0-100: 0=low quality & high compression, 100=compress of max quality)
private int targetWidth; // desired width of the image
private int targetHeight; // desired height of the image
- private CordovaUri imageUri; // Uri of captured image
+ private Uri imageUri; // Uri of captured image
+ private String imageFilePath; // File where the image is stored
private int encodingType; // Type of encoding to use
private int mediaType; // What type of media to retrieve
private int destType; // Source type (needs to be saved for the permission handling)
@@ -127,6 +128,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private MediaScannerConnection conn; // Used to update gallery app with newly-written files
private Uri scanMe; // Uri of image to be added to content store
private Uri croppedUri;
+ private String croppedFilePath;
private ExifHelper exifData; // Exif data from source
private String applicationId;
@@ -220,17 +222,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
//--------------------------------------------------------------------------
private String getTempDirectoryPath() {
- File cache = null;
-
- // SD Card Mounted
- if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
- cache = cordova.getActivity().getExternalCacheDir();
- }
- // Use internal storage
- else {
- cache = cordova.getActivity().getCacheDir();
- }
-
+ File cache = cordova.getActivity().getCacheDir();
// Create the cache directory if it doesn't exist
cache.mkdirs();
return cache.getAbsolutePath();
@@ -300,10 +292,11 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
// Specify file so that large image is captured and returned
File photo = createCaptureFile(encodingType);
- this.imageUri = new CordovaUri(FileProvider.getUriForFile(cordova.getActivity(),
- applicationId + ".provider",
- photo));
- intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri.getCorrectUri());
+ this.imageFilePath = photo.getAbsolutePath();
+ this.imageUri = FileProvider.getUriForFile(cordova.getActivity(),
+ applicationId + ".cordova.plugin.camera.provider",
+ photo);
+ intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
//We can write to this URI, this will hopefully allow us to write files to get to the next step
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
@@ -370,6 +363,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
Intent intent = new Intent();
String title = GET_PICTURE;
croppedUri = null;
+ croppedFilePath = null;
if (this.mediaType == PICTURE) {
intent.setType("image/*");
if (this.allowEdit) {
@@ -385,8 +379,9 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
}
- File photo = createCaptureFile(JPEG);
- croppedUri = Uri.fromFile(photo);
+ File croppedFile = createCaptureFile(JPEG);
+ croppedFilePath = croppedFile.getAbsolutePath();
+ croppedUri = Uri.fromFile(croppedFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, croppedUri);
} else {
intent.setAction(Intent.ACTION_GET_CONTENT);
@@ -411,57 +406,57 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
}
}
-
- /**
- * Brings up the UI to perform crop on passed image URI
- *
- * @param picUri
- */
- private void performCrop(Uri picUri, int destType, Intent cameraIntent) {
- try {
- Intent cropIntent = new Intent("com.android.camera.action.CROP");
- // indicate image type and Uri
- cropIntent.setDataAndType(picUri, "image/*");
- // set crop properties
- cropIntent.putExtra("crop", "true");
+ /**
+ * Brings up the UI to perform crop on passed image URI
+ *
+ * @param picUri
+ */
+ private void performCrop(Uri picUri, int destType, Intent cameraIntent) {
+ try {
+ Intent cropIntent = new Intent("com.android.camera.action.CROP");
+ // indicate image type and Uri
+ cropIntent.setDataAndType(picUri, "image/*");
+ // set crop properties
+ cropIntent.putExtra("crop", "true");
- // indicate output X and Y
- if (targetWidth > 0) {
- cropIntent.putExtra("outputX", targetWidth);
- }
- if (targetHeight > 0) {
- cropIntent.putExtra("outputY", targetHeight);
- }
- if (targetHeight > 0 && targetWidth > 0 && targetWidth == targetHeight) {
- cropIntent.putExtra("aspectX", 1);
- cropIntent.putExtra("aspectY", 1);
- }
- // create new file handle to get full resolution crop
- croppedUri = Uri.fromFile(createCaptureFile(this.encodingType, System.currentTimeMillis() + ""));
- cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- cropIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
- cropIntent.putExtra("output", croppedUri);
+ // indicate output X and Y
+ if (targetWidth > 0) {
+ cropIntent.putExtra("outputX", targetWidth);
+ }
+ if (targetHeight > 0) {
+ cropIntent.putExtra("outputY", targetHeight);
+ }
+ if (targetHeight > 0 && targetWidth > 0 && targetWidth == targetHeight) {
+ cropIntent.putExtra("aspectX", 1);
+ cropIntent.putExtra("aspectY", 1);
+ }
+ // create new file handle to get full resolution crop
+ croppedFilePath = createCaptureFile(this.encodingType, System.currentTimeMillis() + "").getAbsolutePath();
+ croppedUri = Uri.parse(croppedFilePath);
+ cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ cropIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
+ cropIntent.putExtra("output", croppedUri);
- // start the activity - we handle returning in onActivityResult
+ // start the activity - we handle returning in onActivityResult
- if (this.cordova != null) {
- this.cordova.startActivityForResult((CordovaPlugin) this,
- cropIntent, CROP_CAMERA + destType);
+ if (this.cordova != null) {
+ this.cordova.startActivityForResult((CordovaPlugin) this,
+ cropIntent, CROP_CAMERA + destType);
+ }
+ } catch (ActivityNotFoundException anfe) {
+ LOG.e(LOG_TAG, "Crop operation not supported on this device");
+ try {
+ processResultFromCamera(destType, cameraIntent);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ LOG.e(LOG_TAG, "Unable to write to file");
+ }
}
- } catch (ActivityNotFoundException anfe) {
- LOG.e(LOG_TAG, "Crop operation not supported on this device");
- try {
- processResultFromCamera(destType, cameraIntent);
- }
- catch (IOException e)
- {
- e.printStackTrace();
- LOG.e(LOG_TAG, "Unable to write to file");
- }
}
- }
/**
* Applies all needed transformation to the image received from the camera.
@@ -476,8 +471,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
ExifHelper exif = new ExifHelper();
String sourcePath = (this.allowEdit && this.croppedUri != null) ?
- FileHelper.stripFileProtocol(this.croppedUri.toString()) :
- this.imageUri.getFilePath();
+ this.croppedFilePath :
+ this.imageFilePath;
if (this.encodingType == JPEG) {
@@ -499,16 +494,18 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
// in the gallery and the modified image is saved in the temporary
// directory
if (this.saveToPhotoAlbum) {
- galleryUri = Uri.fromFile(new File(getPicturesPath()));
+ GalleryPathVO galleryPathVO = getPicturesPath();
+ galleryUri = Uri.fromFile(new File(galleryPathVO.getGalleryPath()));
if (this.allowEdit && this.croppedUri != null) {
writeUncompressedImage(croppedUri, galleryUri);
} else {
- Uri imageUri = this.imageUri.getFileUri();
- writeUncompressedImage(imageUri, galleryUri);
+ if (Build.VERSION.SDK_INT <= 28) { // Between LOLLIPOP_MR1 and P, can be changed later to the constant Build.VERSION_CODES.P
+ writeTakenPictureToGalleryLowerThanAndroidQ(galleryUri);
+ } else { // Android Q or higher
+ writeTakenPictureToGalleryStartingFromAndroidQ(galleryPathVO);
+ }
}
-
- refreshGallery(galleryUri);
}
// If sending base64 image back
@@ -536,7 +533,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
}
// If sending filename back
- else if (destType == FILE_URI || destType == NATIVE_URI) {
+ else if (destType == FILE_URI) {
// If all this is true we shouldn't compress the image.
if (this.targetHeight == -1 && this.targetWidth == -1 && this.mQuality == 100 &&
!this.correctOrientation) {
@@ -549,10 +546,10 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
Uri uri = Uri.fromFile(createCaptureFile(this.encodingType, System.currentTimeMillis() + ""));
if (this.allowEdit && this.croppedUri != null) {
- Uri croppedUri = Uri.fromFile(new File(getFileNameFromUri(this.croppedUri)));
+ Uri croppedUri = Uri.parse(croppedFilePath);
writeUncompressedImage(croppedUri, uri);
} else {
- Uri imageUri = this.imageUri.getFileUri();
+ Uri imageUri = this.imageUri;
writeUncompressedImage(imageUri, uri);
}
@@ -572,9 +569,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
// Add compressed version of captured image to returned media store Uri
OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri);
- CompressFormat compressFormat = encodingType == JPEG ?
- CompressFormat.JPEG :
- CompressFormat.PNG;
+ CompressFormat compressFormat = getCompressFormatForEncodingType(encodingType);
bitmap.compress(compressFormat, this.mQuality, os);
os.close();
@@ -598,22 +593,45 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
throw new IllegalStateException();
}
- this.cleanup(FILE_URI, this.imageUri.getFileUri(), galleryUri, bitmap);
+ this.cleanup(FILE_URI, this.imageUri, galleryUri, bitmap);
bitmap = null;
}
- private String getPicturesPath() {
+ private void writeTakenPictureToGalleryLowerThanAndroidQ(Uri galleryUri) throws IOException {
+ writeUncompressedImage(imageUri, galleryUri);
+ refreshGallery(galleryUri);
+ }
+
+ private void writeTakenPictureToGalleryStartingFromAndroidQ(GalleryPathVO galleryPathVO) throws IOException {
+ // Starting from Android Q, working with the ACTION_MEDIA_SCANNER_SCAN_FILE intent is deprecated
+ // https://developer.android.com/reference/android/content/Intent#ACTION_MEDIA_SCANNER_SCAN_FILE
+ // we must start working with the MediaStore from Android Q on.
+ ContentResolver resolver = this.cordova.getActivity().getContentResolver();
+ ContentValues contentValues = new ContentValues();
+ contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, galleryPathVO.getGalleryFileName());
+ contentValues.put(MediaStore.MediaColumns.MIME_TYPE, getMimetypeForFormat(encodingType));
+ Uri galleryOutputUri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);
+
+ InputStream fileStream = org.apache.cordova.camera.FileHelper.getInputStreamFromUriString(imageUri.toString(), cordova);
+ writeUncompressedImage(fileStream, galleryOutputUri);
+ }
+
+ private CompressFormat getCompressFormatForEncodingType(int encodingType) {
+ return encodingType == JPEG ? CompressFormat.JPEG : CompressFormat.PNG;
+ }
+
+ private GalleryPathVO getPicturesPath() {
String timeStamp = new SimpleDateFormat(TIME_FORMAT).format(new Date());
String imageFileName = "IMG_" + timeStamp + (this.encodingType == JPEG ? JPEG_EXTENSION : PNG_EXTENSION);
File storageDir = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES);
storageDir.mkdirs();
- String galleryPath = storageDir.getAbsolutePath() + "/" + imageFileName;
- return galleryPath;
+ return new GalleryPathVO(storageDir.getAbsolutePath(), imageFileName);
}
private void refreshGallery(Uri contentUri) {
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+ // Starting from Android Q, working with the ACTION_MEDIA_SCANNER_SCAN_FILE intent is deprecated
mediaScanIntent.setData(contentUri);
this.cordova.getActivity().sendBroadcast(mediaScanIntent);
}
@@ -645,9 +663,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
String modifiedPath = getTempDirectoryPath() + "/" + fileName;
OutputStream os = new FileOutputStream(modifiedPath);
- CompressFormat compressFormat = this.encodingType == JPEG ?
- CompressFormat.JPEG :
- CompressFormat.PNG;
+ CompressFormat compressFormat = getCompressFormatForEncodingType(this.encodingType);
bitmap.compress(compressFormat, this.mQuality, os);
os.close();
@@ -684,74 +700,80 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
return;
}
}
- int rotate = 0;
String fileLocation = FileHelper.getRealPath(uri, this.cordova);
LOG.d(LOG_TAG, "File location is: " + fileLocation);
String uriString = uri.toString();
+ String finalLocation = fileLocation != null ? fileLocation : uriString;
String mimeType = FileHelper.getMimeType(uriString, this.cordova);
- // If you ask for video or the selected file doesn't have JPEG or PNG mime type
- // there will be no attempt to resize any returned data
- if (this.mediaType == VIDEO || !(JPEG_MIME_TYPE.equalsIgnoreCase(mimeType) || PNG_MIME_TYPE.equalsIgnoreCase(mimeType))) {
- this.callbackContext.success(fileLocation);
- }
- else {
+ if (finalLocation == null) {
+ this.failPicture("Error retrieving result.");
+ } else {
- // This is a special case to just return the path as no scaling,
- // rotating, nor compressing needs to be done
- if (this.targetHeight == -1 && this.targetWidth == -1 &&
- (destType == FILE_URI || destType == NATIVE_URI) && !this.correctOrientation &&
- mimeType != null && mimeType.equalsIgnoreCase(getMimetypeForFormat(encodingType)))
- {
- this.callbackContext.success(uriString);
- } else {
- Bitmap bitmap = null;
- try {
- bitmap = getScaledAndRotatedBitmap(uriString);
- } catch (IOException e) {
- e.printStackTrace();
- }
- if (bitmap == null) {
- LOG.d(LOG_TAG, "I either have a null image path or bitmap");
- this.failPicture("Unable to create bitmap!");
- return;
- }
+ // If you ask for video or the selected file doesn't have JPEG or PNG mime type
+ // there will be no attempt to resize any returned data
+ if (this.mediaType == VIDEO || !(JPEG_MIME_TYPE.equalsIgnoreCase(mimeType) || PNG_MIME_TYPE.equalsIgnoreCase(mimeType))) {
+ this.callbackContext.success(finalLocation);
+ }
+ else {
- // If sending base64 image back
- if (destType == DATA_URL) {
- this.processPicture(bitmap, this.encodingType);
- }
+ // This is a special case to just return the path as no scaling,
+ // rotating, nor compressing needs to be done
+ if (this.targetHeight == -1 && this.targetWidth == -1 &&
+ destType == FILE_URI && !this.correctOrientation &&
+ mimeType != null && mimeType.equalsIgnoreCase(getMimetypeForFormat(encodingType)))
+ {
+ this.callbackContext.success(finalLocation);
+ } else {
+ Bitmap bitmap = null;
+ try {
+ bitmap = getScaledAndRotatedBitmap(uriString);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ if (bitmap == null) {
+ LOG.d(LOG_TAG, "I either have a null image path or bitmap");
+ this.failPicture("Unable to create bitmap!");
+ return;
+ }
- // If sending filename back
- else if (destType == FILE_URI || destType == NATIVE_URI) {
- // Did we modify the image?
- if ( (this.targetHeight > 0 && this.targetWidth > 0) ||
- (this.correctOrientation && this.orientationCorrected) ||
- !mimeType.equalsIgnoreCase(getMimetypeForFormat(encodingType)))
- {
- try {
- String modifiedPath = this.outputModifiedBitmap(bitmap, uri);
- // The modified image is cached by the app in order to get around this and not have to delete you
- // application cache I'm adding the current system time to the end of the file url.
- this.callbackContext.success("file://" + modifiedPath + "?" + System.currentTimeMillis());
-
- } catch (Exception e) {
- e.printStackTrace();
- this.failPicture("Error retrieving image.");
+ // If sending base64 image back
+ if (destType == DATA_URL) {
+ this.processPicture(bitmap, this.encodingType);
+ }
+
+ // If sending filename back
+ else if (destType == FILE_URI) {
+ // Did we modify the image?
+ if ( (this.targetHeight > 0 && this.targetWidth > 0) ||
+ (this.correctOrientation && this.orientationCorrected) ||
+ !mimeType.equalsIgnoreCase(getMimetypeForFormat(encodingType)))
+ {
+ try {
+ String modifiedPath = this.outputModifiedBitmap(bitmap, uri);
+ // The modified image is cached by the app in order to get around this and not have to delete you
+ // application cache I'm adding the current system time to the end of the file url.
+ this.callbackContext.success("file://" + modifiedPath + "?" + System.currentTimeMillis());
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ this.failPicture("Error retrieving image.");
+ }
+ } else {
+ this.callbackContext.success(finalLocation);
}
- } else {
- this.callbackContext.success(fileLocation);
}
+ if (bitmap != null) {
+ bitmap.recycle();
+ bitmap = null;
+ }
+ System.gc();
}
- if (bitmap != null) {
- bitmap.recycle();
- bitmap = null;
- }
- System.gc();
}
}
+
}
/**
@@ -799,7 +821,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
try {
if (this.allowEdit) {
Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
- applicationId + ".provider",
+ applicationId + ".cordova.plugin.camera.provider",
createCaptureFile(this.encodingType));
performCrop(tmpFile, destType, intent);
} else {
@@ -898,34 +920,11 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private void writeUncompressedImage(Uri src, Uri dest) throws FileNotFoundException,
IOException {
- FileInputStream fis = new FileInputStream(FileHelper.stripFileProtocol(src.toString()));
+ InputStream fis = FileHelper.getInputStreamFromUriString(src.toString(), cordova);
writeUncompressedImage(fis, dest);
}
- /**
- * Create entry in media store for image
- *
- * @return uri
- */
- private Uri getUriFromMediaStore() {
- ContentValues values = new ContentValues();
- values.put(MediaStore.Images.Media.MIME_TYPE, JPEG_MIME_TYPE);
- Uri uri;
- try {
- uri = this.cordova.getActivity().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
- } catch (RuntimeException e) {
- LOG.d(LOG_TAG, "Can't write to external media storage.");
- try {
- uri = this.cordova.getActivity().getContentResolver().insert(MediaStore.Images.Media.INTERNAL_CONTENT_URI, values);
- } catch (RuntimeException ex) {
- LOG.d(LOG_TAG, "Can't write to internal media storage.");
- return null;
- }
- }
- return uri;
- }
-
/**
* Return a scaled and rotated bitmap based on the target width and height
*
@@ -1256,9 +1255,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
*/
public void processPicture(Bitmap bitmap, int encodingType) {
ByteArrayOutputStream jpeg_data = new ByteArrayOutputStream();
- CompressFormat compressFormat = encodingType == JPEG ?
- CompressFormat.JPEG :
- CompressFormat.PNG;
+ CompressFormat compressFormat = getCompressFormatForEncodingType(encodingType);
try {
if (bitmap.compress(compressFormat, mQuality, jpeg_data)) {
@@ -1346,11 +1343,11 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
state.putBoolean("saveToPhotoAlbum", this.saveToPhotoAlbum);
if (this.croppedUri != null) {
- state.putString(CROPPED_URI_KEY, this.croppedUri.toString());
+ state.putString(CROPPED_URI_KEY, this.croppedFilePath);
}
if (this.imageUri != null) {
- state.putString(IMAGE_URI_KEY, this.imageUri.getFileUri().toString());
+ state.putString(IMAGE_URI_KEY, this.imageFilePath);
}
return state;
@@ -1375,28 +1372,9 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
if (state.containsKey(IMAGE_URI_KEY)) {
//I have no idea what type of URI is being passed in
- this.imageUri = new CordovaUri(Uri.parse(state.getString(IMAGE_URI_KEY)));
+ this.imageUri = Uri.parse(state.getString(IMAGE_URI_KEY));
}
this.callbackContext = callbackContext;
}
-
- /*
- * This is dirty, but it does the job.
- *
- * Since the FilesProvider doesn't really provide you a way of getting a URL from the file,
- * and since we actually need the Camera to create the file for us most of the time, we don't
- * actually write the file, just generate the location based on a timestamp, we need to get it
- * back from the Intent.
- *
- * However, the FilesProvider preserves the path, so we can at least write to it from here, since
- * we own the context in this case.
- */
- private String getFileNameFromUri(Uri uri) {
- String fullUri = uri.toString();
- String partial_path = fullUri.split("external_files")[1];
- File external_storage = Environment.getExternalStorageDirectory();
- String path = external_storage.getAbsolutePath() + partial_path;
- return path;
- }
}
diff --git a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CordovaUri.java b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CordovaUri.java
deleted file mode 100755
index 5c2224d42..000000000
--- a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/CordovaUri.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-package org.apache.cordova.camera;
-
-import android.net.Uri;
-import android.os.Build;
-import android.os.Environment;
-import android.support.v4.content.FileProvider;
-
-import java.io.File;
-
-/*
- * This class exists because Andorid FilesProvider doesn't work on Android 4.4.4 and below and throws
- * weird errors. I'm not sure why writing to shared cache directories is somehow verboten, but it is
- * and this error is irritating for a Compatibility library to have.
- *
- */
-
-public class CordovaUri {
-
- private Uri androidUri;
- private String fileName;
- private Uri fileUri;
-
- /*
- * We always expect a FileProvider string to be passed in for the file that we create
- *
- */
- CordovaUri (Uri inputUri)
- {
- //Determine whether the file is a content or file URI
- if(inputUri.getScheme().equals("content"))
- {
- androidUri = inputUri;
- fileName = getFileNameFromUri(androidUri);
- fileUri = Uri.parse("file://" + fileName);
- }
- else
- {
- fileUri = inputUri;
- fileName = FileHelper.stripFileProtocol(inputUri.toString());
- }
- }
-
- public Uri getFileUri()
- {
- return fileUri;
- }
-
- public String getFilePath()
- {
- return fileName;
- }
-
- /*
- * This only gets called by takePicture
- */
-
- public Uri getCorrectUri()
- {
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
- return androidUri;
- else
- return fileUri;
- }
-
- /*
- * This is dirty, but it does the job.
- *
- * Since the FilesProvider doesn't really provide you a way of getting a URL from the file,
- * and since we actually need the Camera to create the file for us most of the time, we don't
- * actually write the file, just generate the location based on a timestamp, we need to get it
- * back from the Intent.
- *
- * However, the FilesProvider preserves the path, so we can at least write to it from here, since
- * we own the context in this case.
- */
-
- private String getFileNameFromUri(Uri uri) {
- String fullUri = uri.toString();
- String partial_path = fullUri.split("external_files")[1];
- File external_storage = Environment.getExternalStorageDirectory();
- String path = external_storage.getAbsolutePath() + partial_path;
- return path;
-
- }
-}
diff --git a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileHelper.java b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileHelper.java
index edf165787..a6e5574bf 100755
--- a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileHelper.java
+++ b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileHelper.java
@@ -50,16 +50,7 @@ public class FileHelper {
*/
@SuppressWarnings("deprecation")
public static String getRealPath(Uri uri, CordovaInterface cordova) {
- String realPath = null;
-
- if (Build.VERSION.SDK_INT < 11)
- realPath = FileHelper.getRealPathFromURI_BelowAPI11(cordova.getActivity(), uri);
-
- // SDK >= 11
- else
- realPath = FileHelper.getRealPathFromURI_API11_And_Above(cordova.getActivity(), uri);
-
- return realPath;
+ return FileHelper.getRealPathFromURI(cordova.getActivity(), uri);
}
/**
@@ -75,11 +66,9 @@ public class FileHelper {
}
@SuppressLint("NewApi")
- public static String getRealPathFromURI_API11_And_Above(final Context context, final Uri uri) {
-
- final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+ public static String getRealPathFromURI(final Context context, final Uri uri) {
// DocumentProvider
- if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
+ if (DocumentsContract.isDocumentUri(context, uri)) {
// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
@@ -236,7 +225,7 @@ public class FileHelper {
}
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
}
-
+
/**
* Returns the mime type of the data specified by the given URI string.
*
diff --git a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileProvider.java b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileProvider.java
index 336f93cef..67c214c32 100755
--- a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileProvider.java
+++ b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/FileProvider.java
@@ -18,4 +18,4 @@
*/
package org.apache.cordova.camera;
-public class FileProvider extends android.support.v4.content.FileProvider {}
+public class FileProvider extends androidx.core.content.FileProvider {}
diff --git a/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/GalleryPathVO.java b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/GalleryPathVO.java
new file mode 100644
index 000000000..579044327
--- /dev/null
+++ b/cordova/platforms/android/app/src/main/java/org/apache/cordova/camera/GalleryPathVO.java
@@ -0,0 +1,43 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+package org.apache.cordova.camera;
+
+public class GalleryPathVO {
+ private final String galleryPath;
+ private String picturesDirectory;
+ private String galleryFileName;
+
+ public GalleryPathVO(String picturesDirectory, String galleryFileName) {
+ this.picturesDirectory = picturesDirectory;
+ this.galleryFileName = galleryFileName;
+ this.galleryPath = this.picturesDirectory + "/" + this.galleryFileName;
+ }
+
+ public String getGalleryPath() {
+ return galleryPath;
+ }
+
+ public String getPicturesDirectory() {
+ return picturesDirectory;
+ }
+
+ public String getGalleryFileName() {
+ return galleryFileName;
+ }
+}
diff --git a/cordova/platforms/android/app/src/main/res/xml/camera_provider_paths.xml b/cordova/platforms/android/app/src/main/res/xml/camera_provider_paths.xml
index 2db87bdbd..85546509f 100755
--- a/cordova/platforms/android/app/src/main/res/xml/camera_provider_paths.xml
+++ b/cordova/platforms/android/app/src/main/res/xml/camera_provider_paths.xml
@@ -17,5 +17,5 @@
-->
<paths xmlns:android="http://schemas.android.com/apk/res/android">
- <external-path name="external_files" path="."/>
-</paths>
\ No newline at end of file
+ <cache-path name="cache_files" path="." />
+</paths>
diff --git a/cordova/platforms/android/app/src/main/res/xml/config.xml b/cordova/platforms/android/app/src/main/res/xml/config.xml
index 946805855..d01ad5432 100644
--- a/cordova/platforms/android/app/src/main/res/xml/config.xml
+++ b/cordova/platforms/android/app/src/main/res/xml/config.xml
@@ -1,8 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="org.tagspaces.mobile" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
- <feature name="Downloader">
- <param name="android-package" value="com.whebcraft.android.plugin.Downloader" />
- </feature>
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
@@ -30,6 +27,9 @@
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
+ <feature name="Downloader">
+ <param name="android-package" value="com.whebcraft.android.plugin.Downloader" />
+ </feature>
<name>TagSpaces Beta</name>
<description>
Offline file organizer and browser with tagging support.
@@ -58,4 +58,5 @@
<preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,assets,root" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="27" />
+ <preference name="AndroidXEnabled" value="true" />
</widget>
diff --git a/cordova/platforms/android/gradle.properties b/cordova/platforms/android/gradle.properties
index a4749df1f..8cd4ae60d 100644
--- a/cordova/platforms/android/gradle.properties
+++ b/cordova/platforms/android/gradle.properties
@@ -1,6 +1,6 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048m
-android.useAndroidX=false
-android.enableJetifier=false
+android.useAndroidX=true
+android.enableJetifier=true
cdvMinSdkVersion=22
cdvTargetSdkVersion=27
diff --git a/cordova/platforms/android/platform_www/cordova_plugins.js b/cordova/platforms/android/platform_www/cordova_plugins.js
index 84f828df5..de37a60ff 100644
--- a/cordova/platforms/android/platform_www/cordova_plugins.js
+++ b/cordova/platforms/android/platform_www/cordova_plugins.js
@@ -1,13 +1,5 @@
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
- {
- "id": "com.whebcraft.cordova.plugin.downloader.Downloader",
- "file": "plugins/com.whebcraft.cordova.plugin.downloader/www/Downloader.js",
- "pluginId": "com.whebcraft.cordova.plugin.downloader",
- "clobbers": [
- "plugins.Downloader"
- ]
- },
{
"id": "cordova-plugin-device.device",
"file": "plugins/cordova-plugin-device/www/device.js",
@@ -251,17 +243,26 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"clobbers": [
"window.plugins.socialsharing"
]
+ },
+ {
+ "id": "com.whebcraft.cordova.plugin.downloader.Downloader",
+ "file": "plugins/com.whebcraft.cordova.plugin.downloader/www/Downloader.js",
+ "pluginId": "com.whebcraft.cordova.plugin.downloader",
+ "clobbers": [
+ "plugins.Downloader"
+ ]
}
];
module.exports.metadata = {
- "com.whebcraft.cordova.plugin.downloader": "0.1.0",
"cordova-plugin-device": "2.0.3",
"cordova-plugin-background-mode": "0.7.3",
- "cordova-plugin-camera": "4.1.0",
+ "cordova-plugin-camera": "5.0.1",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-opener2": "3.0.4",
"cordova-plugin-whitelist": "1.3.4",
"es6-promise-plugin": "4.2.2",
- "cordova-plugin-x-socialsharing": "5.6.8"
+ "cordova-plugin-x-socialsharing": "6.0.2",
+ "cordova-plugin-androidx-adapter": "1.1.3",
+ "com.whebcraft.cordova.plugin.downloader": "0.1.0"
};
-});
+});
\ No newline at end of file
diff --git a/cordova/platforms/android/platform_www/plugins/cordova-plugin-camera/www/CameraConstants.js b/cordova/platforms/android/platform_www/plugins/cordova-plugin-camera/www/CameraConstants.js
index 4f4b046f1..0fe4c6d03 100644
--- a/cordova/platforms/android/platform_www/plugins/cordova-plugin-camera/www/CameraConstants.js
+++ b/cordova/platforms/android/platform_www/plugins/cordova-plugin-camera/www/CameraConstants.js
@@ -27,20 +27,14 @@ module.exports = {
/**
* @description
* Defines the output format of `Camera.getPicture` call.
- * _Note:_ On iOS passing `DestinationType.NATIVE_URI` along with
- * `PictureSourceType.PHOTOLIBRARY` or `PictureSourceType.SAVEDPHOTOALBUM` will
- * disable any image modifications (resize, quality change, cropping, etc.) due
- * to implementation specific.
*
* @enum {number}
*/
DestinationType: {
- /** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible */
+ /** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI if possible */
DATA_URL: 0,
/** Return file uri (content://media/external/images/media/2 for Android) */
- FILE_URI: 1,
- /** Return native uri (eg. asset-library://... for iOS) */
- NATIVE_URI: 2
+ FILE_URI: 1
},
/**
* @enum {number}
@@ -65,9 +59,6 @@ module.exports = {
/**
* @description
* Defines the output format of `Camera.getPicture` call.
- * _Note:_ On iOS passing `PictureSourceType.PHOTOLIBRARY` or `PictureSourceType.SAVEDPHOTOALBUM`
- * along with `DestinationType.NATIVE_URI` will disable any image modifications (resize, quality
- * change, cropping, etc.) due to implementation specific.
*
* @enum {number}
*/
diff --git a/cordova/platforms/android/project.properties b/cordova/platforms/android/project.properties
index 764faeb21..780112505 100644
--- a/cordova/platforms/android/project.properties
+++ b/cordova/platforms/android/project.properties
@@ -11,6 +11,6 @@
target=android-29
android.library.reference.1=CordovaLib
android.library.reference.2=app
-cordova.system.library.1=com.android.support:support-v4:27.+
-cordova.system.library.2=com.android.support:support-v4:27.+
-cordova.system.library.3=com.android.support:support-v4:24.1.1+
\ No newline at end of file
+cordova.system.library.1=androidx.legacy:legacy-support-v4:1.0.0
+cordova.system.library.2=androidx.legacy:legacy-support-v4:1.0.0
+cordova.system.library.3=androidx.legacy:legacy-support-v4:1.0.0
diff --git a/cordova/platforms/ios/TagSpaces Beta.xcodeproj/project.pbxproj b/cordova/platforms/ios/TagSpaces Beta.xcodeproj/project.pbxproj
index 0e820b79b..0060cc232 100755
--- a/cordova/platforms/ios/TagSpaces Beta.xcodeproj/project.pbxproj
+++ b/cordova/platforms/ios/TagSpaces Beta.xcodeproj/project.pbxproj
@@ -427,7 +427,7 @@
INFOPLIST_FILE = "TagSpaces Beta/TagSpaces Beta-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.tagspaces.iosn;
+ PRODUCT_BUNDLE_IDENTIFIER = org.tagspaces.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -450,7 +450,7 @@
INFOPLIST_FILE = "TagSpaces Beta/TagSpaces Beta-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = org.tagspaces.iosn;
+ PRODUCT_BUNDLE_IDENTIFIER = org.tagspaces.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
diff --git a/cordova/platforms/ios/TagSpaces Beta/TagSpaces Beta-Info.plist b/cordova/platforms/ios/TagSpaces Beta/TagSpaces Beta-Info.plist
index 0edf7b4e3..ffb58f4e3 100644
--- a/cordova/platforms/ios/TagSpaces Beta/TagSpaces Beta-Info.plist
+++ b/cordova/platforms/ios/TagSpaces Beta/TagSpaces Beta-Info.plist
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0.4</string>
+ <string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.4</string>
+ <string>1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
diff --git a/cordova/platforms/ios/TagSpaces Beta/config.xml b/cordova/platforms/ios/TagSpaces Beta/config.xml
index 0461abe51..d0e7a0995 100644
--- a/cordova/platforms/ios/TagSpaces Beta/config.xml
+++ b/cordova/platforms/ios/TagSpaces Beta/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget id="org.tagspaces.iosn" version="1.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="org.tagspaces.mobile" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="CDVWebViewEngine">
<param name="ios-package" value="CDVWebViewEngine" />
</feature>
diff --git a/cordova/platforms/ios/ios.json b/cordova/platforms/ios/ios.json
index b1f31b22e..9ebdc5acf 100644
--- a/cordova/platforms/ios/ios.json
+++ b/cordova/platforms/ios/ios.json
@@ -96,6 +96,9 @@
"PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
"PACKAGE_NAME": "org.tagspaces.iosn"
+ },
+ "cordova-plugin-androidx-adapter": {
+ "PACKAGE_NAME": "org.tagspaces.iosn"
}
},
"dependent_plugins": {},
@@ -362,6 +365,7 @@
"cordova-plugin-file-opener2": "3.0.4",
"cordova-plugin-whitelist": "1.3.4",
"es6-promise-plugin": "4.2.2",
- "cordova-plugin-x-socialsharing": "5.6.8"
+ "cordova-plugin-x-socialsharing": "5.6.8",
+ "cordova-plugin-androidx-adapter": "1.1.3"
}
}
diff --git a/cordova/platforms/ios/platform_www/cordova_plugins.js b/cordova/platforms/ios/platform_www/cordova_plugins.js
index 8a50dbbfb..c6cd2993d 100644
--- a/cordova/platforms/ios/platform_www/cordova_plugins.js
+++ b/cordova/platforms/ios/platform_www/cordova_plugins.js
@@ -262,6 +262,7 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"cordova-plugin-file-opener2": "3.0.4",
"cordova-plugin-whitelist": "1.3.4",
"es6-promise-plugin": "4.2.2",
- "cordova-plugin-x-socialsharing": "5.6.8"
+ "cordova-plugin-x-socialsharing": "5.6.8",
+ "cordova-plugin-androidx-adapter": "1.1.3"
};
-});
\ No newline at end of file
+});
diff --git a/cordova/platforms/ios/www/cordova_plugins.js b/cordova/platforms/ios/www/cordova_plugins.js
index 8a50dbbfb..c6cd2993d 100644
--- a/cordova/platforms/ios/www/cordova_plugins.js
+++ b/cordova/platforms/ios/www/cordova_plugins.js
@@ -262,6 +262,7 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"cordova-plugin-file-opener2": "3.0.4",
"cordova-plugin-whitelist": "1.3.4",
"es6-promise-plugin": "4.2.2",
- "cordova-plugin-x-socialsharing": "5.6.8"
+ "cordova-plugin-x-socialsharing": "5.6.8",
+ "cordova-plugin-androidx-adapter": "1.1.3"
};
-});
\ No newline at end of file
+});
diff --git a/cordova/yarn.lock b/cordova/yarn.lock
index 0a94296bb..575d72b0a 100644
--- a/cordova/yarn.lock
+++ b/cordova/yarn.lock
@@ -3,9 +3,9 @@
"@globules-io/cordova-plugin-ios-xhr@^1.0.4":
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/@globules-io/cordova-plugin-ios-xhr/-/cordova-plugin-ios-xhr-1.0.5.tgz#02521248716ed5a3ee369c032d44a4b394e2dbd0"
- integrity sha512-3tBWWV2TXTnCGQV+EwaQmXDTVPWAVaB7kSWpFazm68cH3Q3BtjH2s9a0a7xcEs0eajNXok30hzNMzrMvLtgYKQ==
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/@globules-io/cordova-plugin-ios-xhr/-/cordova-plugin-ios-xhr-1.0.8.tgz#8afda50250d4dc0e16c46d8e064c0ea365675d0f"
+ integrity sha512-TNW4KSGzdxGlC9AG+x0EsedbkhZ9cDJeMQznXSATCfABEdl0oAjO+LClyvnxANYROzHL4X/ofCVT4IEolAAIBg==
"@netflix/nerror@^1.1.3":
version "1.1.3"
@@ -43,11 +43,11 @@ abbrev@1:
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
android-versions@^1.5.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/android-versions/-/android-versions-1.5.0.tgz#7790bc74e0812aafd69fb1ad0cb4db4474a525d6"
- integrity sha512-/GWUAqa2OJNlDF5VGSe3SR1QMHEPXxx54Ur56r0qQC0H9FlBr7kyBF2SgVEhzFCPbrW4UcYgVuWrq/2Ty3QvXg==
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/android-versions/-/android-versions-1.6.0.tgz#14792f6849090486726b29959d9fa5dbc0163727"
+ integrity sha512-ojC2Ig7b/KJ6iNtR8e4bacmOsJyEkoERk3CKMIsnH7kJz5z6551NMbrVaRb7KXYavu1d74Uhml/bfcmqT3nAcg==
dependencies:
- semver "^5.4.1"
+ semver "^5.7.1"
ansi@^0.3.1:
version "0.3.1"
@@ -71,12 +71,12 @@ balanced-match@^1.0.0:
"bamboo.cordova.plugin.downloader@git+https://github.com/sytolk/cordova-plugin-downloader.git":
version "1.0.0"
- resolved "git+https://github.com/sytolk/cordova-plugin-downloader.git#b33d614ac9d4dc4c50e38ebde5a9b11e987ca145"
+ resolved "git+https://github.com/sytolk/cordova-plugin-downloader.git#9ab2c3ad6c0faf9aefcc32a7870593daab5c69db"
base64-js@^1.2.3:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
- integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
+ integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
big-integer@^1.6.44:
version "1.6.48"
@@ -135,7 +135,7 @@ cordova-android@^9.0.0:
properties-parser "^0.3.1"
which "^2.0.2"
-cordova-common@^4.0.1:
+cordova-common@^4.0.1, cordova-common@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/cordova-common/-/cordova-common-4.0.2.tgz#c5be3f3811f5731cd1d7eb5193b0789a8d5a854f"
integrity sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==
@@ -156,11 +156,11 @@ cordova-common@^4.0.1:
underscore "^1.9.2"
cordova-ios@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/cordova-ios/-/cordova-ios-6.1.0.tgz#24f52007dddadabcfcec3a0cade7ff7646d43ecc"
- integrity sha512-FlX17lC2w78CqEQXypSeFIW3vUFF7VkCjNNLN+EbvOlLld5LUIbNJWepBdKlEg1/ZMmTwAuucMuKSZTr37ra+Q==
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/cordova-ios/-/cordova-ios-6.1.1.tgz#3347303ddbc3a98073fcb5e0d3af47db66ea2491"
+ integrity sha512-WHNvjVhkuwRpq95rISVXtcRyd6UGZapbmU+hO/CAn1c0AIT5WnO8mg2mOjv0WDNa0mt/V5P+N2Vig1UWwfxa5Q==
dependencies:
- cordova-common "^4.0.1"
+ cordova-common "^4.0.2"
fs-extra "^9.0.0"
ios-sim "^8.0.2"
nopt "^4.0.3"
@@ -171,6 +171,14 @@ cordova-ios@^6.1.0:
xcode "^3.0.1"
xml-escape "^1.1.0"
+cordova-plugin-androidx-adapter@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/cordova-plugin-androidx-adapter/-/cordova-plugin-androidx-adapter-1.1.3.tgz#aa7e673ee342de208a6a34a50986ee2ac4b5ba60"
+ integrity sha512-W1SImn0cCCvOSTSfWWp5TnanIQrSuh2Bch+dcZXIzEn0km3Qb7VryeAqHhgBQYwwzC5Ollk1DtUAk/AJSojuZA==
+ dependencies:
+ q "^1.5.1"
+ recursive-readdir "^2.2.2"
+
cordova-plugin-background-mode@^0.7.3:
version "0.7.3"
resolved "https://registry.yarnpkg.com/cordova-plugin-background-mode/-/cordova-plugin-background-mode-0.7.3.tgz#066f92c99f403b3ed3d6fb91f281a0a7ccbc84ba"
@@ -181,10 +189,10 @@ cordova-plugin-device@^2.0.3:
resolved "https://registry.yarnpkg.com/cordova-plugin-device/-/cordova-plugin-device-2.0.3.tgz#c2b41b7efd0455dd097f89356d85bfdd5dadeb0f"
integrity sha512-Jb3V72btxf3XHpkPQsGdyc8N6tVBYn1vsxSFj43fIz9vonJDUThYPCJJHqk6PX6N4dJw6I4FjxkpfCR4LDYMlw==
-cordova-plugin-file-opener2@^3.0.3:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/cordova-plugin-file-opener2/-/cordova-plugin-file-opener2-3.0.4.tgz#e95cf2da11666cbf25346a4c9463ec4dd162c6fd"
- integrity sha512-bd1aCx62X2RwpC+KUiuB7quoxL/8RnPMEJU7x38Tvs+cUGLWBvsmR9+/LqGBsSns2CIqgnJ34TW0Vazoqu7Ieg==
+cordova-plugin-file-opener2@^3.0.5:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/cordova-plugin-file-opener2/-/cordova-plugin-file-opener2-3.0.5.tgz#3bf481a724bcec9cfa2257a71915309df5ea5b4d"
+ integrity sha512-tjLHDamH5+y0bJZYVe2967L1S4R8tL4Y0rJUzJGoxsyiw3FUlrJNS199POOpzZZ6Xhlntn9a2o7+84r1dMN21A==
version "6.0.2"
@@ -239,9 +247,9 @@ es6-promise-plugin@^4.2.2:
integrity sha512-uoA4aVplXI9oqUYJFBAVRwAqIN9/n9JgrTAUGX3qPbnSZVE5yY1+6/MsoN5f4xsaPO62WjPHOdtts6okMN6tNA==
execa@^4.0.2:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2"
- integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
+ integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
dependencies:
cross-spawn "^7.0.0"
get-stream "^5.0.0"
@@ -276,9 +284,9 @@ fast-json-parse@^1.0.3:
integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==
fastq@^1.6.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
- integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.9.0.tgz#e16a72f338eaca48e91b5c23593bcc2ef66b7947"
+ integrity sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==
dependencies:
reusify "^1.0.4"
@@ -391,11 +399,11 @@ isexe@^2.0.0:
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
jsonfile@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179"
- integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
+ integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
- universalify "^1.0.0"
+ universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"
@@ -404,6 +412,13 @@ lodash@^4.17.15:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
+lru-cache@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
+ integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
+ dependencies:
+ yallist "^4.0.0"
+
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
@@ -427,7 +442,7 @@ mimic-fn@^2.1.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-minimatch@^3.0.4:
[email protected], minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
@@ -560,30 +575,39 @@ read-chunk@^3.2.0:
pify "^4.0.1"
with-open-file "^0.1.6"
+recursive-readdir@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
+ integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==
+ dependencies:
+ minimatch "3.0.4"
+
reusify@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
run-parallel@^1.1.9:
- version "1.1.9"
- resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
- integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
+ version "1.1.10"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef"
+ integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==
version "1.1.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.1.4.tgz#74b6d33c9ae1e001510f179a91168588f1aedaa9"
integrity sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=
-semver@^5.4.1:
+semver@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@^7.3.2:
- version "7.3.2"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
- integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
+ version "7.3.4"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
+ integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
+ dependencies:
+ lru-cache "^6.0.0"
shebang-command@^2.0.0:
version "2.0.0"
@@ -616,9 +640,9 @@ simctl@^2:
tail "^0.4.0"
simple-plist@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.0.tgz#8354ab63eb3922a054c78ce96c209c532e907a23"
- integrity sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg==
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.1.tgz#54367ca28bc5996a982c325c1c4a4c1a05f4047c"
+ integrity sha512-pKMCVKvZbZTsqYR6RKgLfBHkh2cV89GXcA/0CVPje3sOiNOnXA8+rp/ciAMZ7JRaUdLzlEM6JFfUn+fS6Nt3hg==
dependencies:
bplist-creator "0.0.8"
bplist-parser "0.2.0"
@@ -657,15 +681,20 @@ to-regex-range@^5.0.1:
is-number "^7.0.0"
underscore@^1.9.2:
- version "1.10.2"
- resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf"
- integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.0.tgz#4814940551fc80587cef7840d1ebb0f16453be97"
+ integrity sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ==
universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==
+universalify@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
+ integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
+
unorm@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af"
@@ -719,3 +748,8 @@ [email protected]:
version "0.1.31"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
+
+yallist@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==