TagSpaces is an offline, open source, document manager with tagging support
TSN355 fix list files on Android API 10 (#1189)
Stanimird7f97c4464f5
diff --git a/cordova/config.xml b/cordova/config.xmlindex 63a5a6056..518292eeb 100644--- a/cordova/config.xml+++ b/cordova/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"><name>TagSpaces Beta</name><description>Offline file organizer and browser with tagging support.@@ -17,7 +17,8 @@<allow-intent href="geo:*" /><platform name="android"><allow-intent href="market:*" />- <preference name="android-minSdkVersion" value="23" />+ <preference name="android-minSdkVersion" value="22" />+ <preference name="android-targetSdkVersion" value="27" /><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/platforms/android/android.json b/cordova/platforms/android/android.jsonindex ffe3a24fe..7a0dcb0fd 100644--- a/cordova/platforms/android/android.json+++ b/cordova/platforms/android/android.json@@ -117,37 +117,34 @@},"installed_plugins": {"com.whebcraft.cordova.plugin.downloader": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-device": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-background-mode": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-camera": {"ANDROID_SUPPORT_V4_VERSION": "27.+",- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-file": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-file-opener2": {"ANDROID_SUPPORT_V4_VERSION": "27.+",- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-whitelist": {- "PACKAGE_NAME": "org.tagspaces.iosn"- },- "cordova-plugin-wkwebview-engine": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"es6-promise-plugin": {- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"},"cordova-plugin-x-socialsharing": {"ANDROID_SUPPORT_V4_VERSION": "24.1.1+",- "PACKAGE_NAME": "org.tagspaces.iosn"+ "PACKAGE_NAME": "org.tagspaces.mobile"}},"dependent_plugins": {},@@ -413,7 +410,6 @@"cordova-plugin-file": "6.0.2","cordova-plugin-file-opener2": "3.0.4","cordova-plugin-whitelist": "1.3.4",- "cordova-plugin-wkwebview-engine": "1.2.1","es6-promise-plugin": "4.2.2","cordova-plugin-x-socialsharing": "5.6.8"}diff --git a/cordova/platforms/android/app/src/main/AndroidManifest.xml b/cordova/platforms/android/app/src/main/AndroidManifest.xmlindex 2737661c3..50387004f 100644--- a/cordova/platforms/android/app/src/main/AndroidManifest.xml+++ b/cordova/platforms/android/app/src/main/AndroidManifest.xml@@ -1,5 +1,5 @@<?xml version='1.0' encoding='utf-8'?>-<manifest android:hardwareAccelerated="true" android:versionCode="10004" android:versionName="1.0.4" package="org.tagspaces.iosn" xmlns:android="http://schemas.android.com/apk/res/android">+<manifest android:hardwareAccelerated="true" android:versionCode="10000" android:versionName="1.0.0" package="org.tagspaces.mobile" xmlns:android="http://schemas.android.com/apk/res/android"><supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /><uses-permission android:name="android.permission.INTERNET" /><application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true">diff --git a/cordova/platforms/android/app/src/main/java/org/tagspaces/iosn/MainActivity.java b/cordova/platforms/android/app/src/main/java/org/tagspaces/mobile/MainActivity.javasimilarity index 97%rename from cordova/platforms/android/app/src/main/java/org/tagspaces/iosn/MainActivity.javarename to cordova/platforms/android/app/src/main/java/org/tagspaces/mobile/MainActivity.javaindex d89b1587a..76558b5d0 100644--- a/cordova/platforms/android/app/src/main/java/org/tagspaces/iosn/MainActivity.java+++ b/cordova/platforms/android/app/src/main/java/org/tagspaces/mobile/MainActivity.java@@ -17,7 +17,7 @@under the License.*/-package org.tagspaces.iosn;+package org.tagspaces.mobile;import android.os.Bundle;import org.apache.cordova.*;diff --git a/cordova/platforms/android/app/src/main/res/xml/config.xml b/cordova/platforms/android/app/src/main/res/xml/config.xmlindex d871992a9..946805855 100644--- a/cordova/platforms/android/app/src/main/res/xml/config.xml+++ b/cordova/platforms/android/app/src/main/res/xml/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="Downloader"><param name="android-package" value="com.whebcraft.android.plugin.Downloader" /></feature>@@ -56,5 +56,6 @@<preference name="AndroidPersistentFileLocation" value="Compatibility" /><preference name="iosExtraFilesystems" value="library,library-nosync,documents,documents-nosync,cache,bundle,root" /><preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,assets,root" />- <preference name="android-minSdkVersion" value="23" />+ <preference name="android-minSdkVersion" value="22" />+ <preference name="android-targetSdkVersion" value="27" /></widget>diff --git a/cordova/platforms/android/gradle.properties b/cordova/platforms/android/gradle.propertiesindex 3ad35a4ab..a4749df1f 100644--- a/cordova/platforms/android/gradle.properties+++ b/cordova/platforms/android/gradle.properties@@ -2,4 +2,5 @@ org.gradle.daemon=trueorg.gradle.jvmargs=-Xmx2048mandroid.useAndroidX=falseandroid.enableJetifier=false-cdvMinSdkVersion=23\ No newline at end of file+cdvMinSdkVersion=22+cdvTargetSdkVersion=27diff --git a/cordova/platforms/android/gradle/wrapper/gradle-wrapper.properties b/cordova/platforms/android/gradle/wrapper/gradle-wrapper.propertiesindex cb18e0e08..4154807e5 100644--- a/cordova/platforms/android/gradle/wrapper/gradle-wrapper.properties+++ b/cordova/platforms/android/gradle/wrapper/gradle-wrapper.properties@@ -1,5 +1,5 @@distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/dists+distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zipzipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists-distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zipdiff --git a/cordova/platforms/android/gradlew b/cordova/platforms/android/gradlewindex cccdd3d51..4f906e0c8 100755--- a/cordova/platforms/android/gradlew+++ b/cordova/platforms/android/gradlew@@ -1,5 +1,21 @@#!/usr/bin/env sh+#+# Copyright 2015 the original author or authors.+#+# Licensed 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+#+# https://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.+#+################################################################################## Gradle start up script for UN*X@@ -28,7 +44,7 @@ APP_NAME="Gradle"APP_BASE_NAME=`basename "$0"`# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.-DEFAULT_JVM_OPTS=""+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'# Use the maximum available, or set MAX_FD != -1 to use that value.MAX_FD="maximum"@@ -66,6 +82,7 @@ esacCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar+# Determine the Java command to use to start the JVM.if [ -n "$JAVA_HOME" ] ; thenif [ -x "$JAVA_HOME/jre/sh/java" ] ; then@@ -109,10 +126,11 @@ if $darwin; thenGRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""fi-# For Cygwin, switch paths to Windows format before running java-if $cygwin ; then+# For Cygwin or MSYS, switch paths to Windows format before running java+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; thenAPP_HOME=`cygpath --path --mixed "$APP_HOME"`CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`+JAVACMD=`cygpath --unix "$JAVACMD"`# We build the pattern for arguments to be converted via cygpath@@ -138,19 +156,19 @@ if $cygwin ; thenelseeval `echo args$i`="\"$arg\""fi- i=$((i+1))+ i=`expr $i + 1`donecase $i in- (0) set -- ;;- (1) set -- "$args0" ;;- (2) set -- "$args0" "$args1" ;;- (3) set -- "$args0" "$args1" "$args2" ;;- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;+ 0) set -- ;;+ 1) set -- "$args0" ;;+ 2) set -- "$args0" "$args1" ;;+ 3) set -- "$args0" "$args1" "$args2" ;;+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;esacfi@@ -159,14 +177,9 @@ save () {for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; doneecho " "}-APP_ARGS=$(save "$@")+APP_ARGS=`save "$@"`# Collect all arguments for the java command, following the shell quoting and substitution ruleseval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then- cd "$(dirname "$0")"-fi-exec "$JAVACMD" "$@"diff --git a/cordova/platforms/android/gradlew.bat b/cordova/platforms/android/gradlew.batindex f9553162f..5093609d5 100644--- a/cordova/platforms/android/gradlew.bat+++ b/cordova/platforms/android/gradlew.bat@@ -1,3 +1,19 @@+@rem+@rem Copyright 2015 the original author or authors.+@rem+@rem Licensed under the Apache License, Version 2.0 (the "License");+@rem you may not use this file except in compliance with the License.+@rem You may obtain a copy of the License at+@rem+@rem https://www.apache.org/licenses/LICENSE-2.0+@rem+@rem Unless required by applicable law or agreed to in writing, software+@rem distributed under the License is distributed on an "AS IS" BASIS,+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+@rem See the License for the specific language governing permissions and+@rem limitations under the License.+@rem+@if "%DEBUG%" == "" @echo off@rem ##########################################################################@rem@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.set APP_BASE_NAME=%~n0set APP_HOME=%DIRNAME%+@rem Resolve any "." and ".." in APP_HOME to make it shorter.+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.-set DEFAULT_JVM_OPTS=+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"@rem Find java.exeif defined JAVA_HOME goto findJavaFromJavaHome@@ -65,6 +84,7 @@ set CMD_LINE_ARGS=%*set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar+@rem Execute Gradle"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%diff --git a/cordova/platforms/android/platform_www/cordova_plugins.js b/cordova/platforms/android/platform_www/cordova_plugins.jsindex 930d4b0bb..84f828df5 100644--- a/cordova/platforms/android/platform_www/cordova_plugins.js+++ b/cordova/platforms/android/platform_www/cordova_plugins.js@@ -261,7 +261,6 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {"cordova-plugin-file": "6.0.2","cordova-plugin-file-opener2": "3.0.4","cordova-plugin-whitelist": "1.3.4",- "cordova-plugin-wkwebview-engine": "1.2.1","es6-promise-plugin": "4.2.2","cordova-plugin-x-socialsharing": "5.6.8"};