diff --git a/build-aim.sh b/build-aim.sh
index 4c004514..1b62e8e1 100755
--- a/build-aim.sh
+++ b/build-aim.sh
@@ -4,16 +4,14 @@
DIR=$( cd "$( dirname "$0" )" && pwd )
TRUNK=$DIR
CURRENT_OS="OSX"
-ANDROID_VER="@6.3.0" # cordova-android version
-IOS_VER="@4.5.4" # cordova-ios version
-WIN_VER="@latest" # cordova-windows version
+ANDROID_VER="@12.0.1" # cordova-android version
+IOS_VER="@7.0.1" # cordova-ios version
echo " "
echo "-- Adapt It Mobile build configuration --"
echo " Current directory: $DIR"
echo " cordova-android: $ANDROID_VER"
echo " cordova-ios: $IOS_VER"
-echo " cordova-win: $WIN_VER"
echo "-------------------------------------"
# troubleshooting helps -- enable if needed
@@ -49,15 +47,6 @@ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
osType="Linux"
echo "Linux detected... adding android platform"
cordova platform add android $ANDROID_VER
-elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
- # Ancient mingw Windows thing -- error out
- echo "unsupported operating system for AIM build"
- exit 1
-elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
- # Windows 10? 64 bit mingw implementation
- osType="Windows"
- cordova platform add android $ANDROID_VER
- cordova platform add windows $WIN_VER
fi
# build ios and Android platforms
diff --git a/config.xml b/config.xml
index babbf3f4..aace9fed 100644
--- a/config.xml
+++ b/config.xml
@@ -10,7 +10,6 @@
-
@@ -36,7 +35,6 @@
-
diff --git a/package.json b/package.json
index f6609f47..91ea2dff 100644
--- a/package.json
+++ b/package.json
@@ -21,19 +21,19 @@
"cordova-clipboard": "github:ihadeed/cordova-clipboard",
"cordova-ios": "^7.0.1",
"cordova-plugin-customurlscheme": "^5.0.2",
- "cordova-plugin-device": "^2.0.3",
+ "cordova-plugin-device": "github:apache/cordova-plugin-device",
"cordova-plugin-dialogs": "^2.0.2",
- "cordova-plugin-file": "^6.0.2",
+ "cordova-plugin-file": "^8.0.0",
"cordova-plugin-filepath": "github:VIAVI-Solutions/cordova-plugin-filepath",
- "cordova-plugin-keyboard": "git+https://github.com/sinn1/cordova-plugin-keyboard.git",
- "cordova-plugin-network-information": "^3.0.0",
+ "cordova-plugin-keyboard": "github:sinn1/cordova-plugin-keyboard",
+ "cordova-plugin-network-information": "github:apache/cordova-plugin-network-information",
"cordova-plugin-x-socialsharing-android12": "github:IsraelHikingMap/corodova-plugin-socialsharing-android12",
"cordova-sqlite-evcore-extbuild-free": "^0.18.0",
"cordova-uglify": "^0.0.8",
- "cordova.plugins.diagnostic": "^3.9.2",
"fs": "0.0.2",
"gulp": "^3.9.1",
"path": "^0.12.7",
+ "phonegap-plugin-mobile-accessibility": "github:phonegap/phonegap-mobile-accessibility",
"plist": "^3.0.1"
},
"dependencies": {
@@ -44,8 +44,7 @@
"crypto-randomuuid": "^1.0.0",
"electron-builder": "^23.0.3",
"gulp-uglify": "^3.0.2",
- "npx": "^3.0.0",
- "phonegap-plugin-mobile-accessibility": "https://github.com/phonegap/phonegap-mobile-accessibility.git"
+ "npx": "^3.0.0"
},
"bugs": {
"url": "https://github.com/adapt-it/adapt-it-mobile/issues"
@@ -74,9 +73,6 @@
"cordova-plugin-device": {},
"cordova-plugin-dialogs": {},
"cordova-plugin-network-information": {},
- "cordova.plugins.diagnostic": {
- "ANDROIDX_VERSION": "1.0.0"
- },
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "aim",
"ANDROID_SCHEME": " ",
@@ -91,11 +87,13 @@
"cordova-clipboard": {},
"cordova-plugin-filepath": {},
"cordova-sqlite-evcore-extbuild-free": {},
- "cordova-plugin-file": {}
+ "cordova-plugin-file": {
+ "ANDROIDX_WEBKIT_VERSION": "1.4.0"
+ }
},
"platforms": [
- "android",
- "ios"
+ "ios",
+ "android"
]
}
}
\ No newline at end of file
diff --git a/www/js/Application.js b/www/js/Application.js
index ab229637..a63bddb6 100755
--- a/www/js/Application.js
+++ b/www/js/Application.js
@@ -189,51 +189,6 @@ define(function (require) {
cordova.file.dataDirectory,
cordova.file.syncedDataDirectory
];
- // if (device.platform === "Android") {
- // // request read access to the external storage if we don't have it
- // cordova.plugins.diagnostic.getExternalStorageAuthorizationStatus(function (status) {
- // if (status === cordova.plugins.diagnostic.permissionStatus.GRANTED) {
- // console.log("External storage use is authorized");
- // } else {
- // cordova.plugins.diagnostic.requestExternalStorageAuthorization(function (result) {
- // console.log("Authorization request for external storage use was " + (result === cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied"));
- // }, function (error) {
- // console.error(error);
- // });
- // }
- // }, function (error) {
- // console.error("The following error occurred: " + error);
- // });
- // // request runtime permissions if needed
- // cordova.plugins.diagnostic.getPermissionsAuthorizationStatus(function(statuses){
- // for (var permission in statuses){
- // switch(statuses[permission]){
- // case cordova.plugins.diagnostic.permissionStatus.GRANTED:
- // console.log("Permission granted to use "+permission);
- // break;
- // case cordova.plugins.diagnostic.permissionStatus.NOT_REQUESTED:
- // console.log("Permission to use "+permission+" has not been requested yet; asking now");
- // cordova.plugins.diagnostic.requestRuntimePermission(function(status){
- // console.log("Runtime permission request result: " + status.toString());
- // }, function(error){
- // console.error("The following error occurred: "+error);
- // }, permission);
- // break;
- // case cordova.plugins.diagnostic.permissionStatus.DENIED_ONCE:
- // console.log("Permission denied to use "+permission+" - ask again?");
- // break;
- // case cordova.plugins.diagnostic.permissionStatus.DENIED_ALWAYS:
- // console.log("Permission permanently denied to use "+permission+" - guess we won't be using it then!");
- // break;
- // }
- // }
- // }, function(error){
- // console.error("The following error occurred: "+error);
- // },[
- // cordova.plugins.diagnostic.permission.WRITE_EXTERNAL_STORAGE,
- // cordova.plugins.diagnostic.permission.READ_EXTERNAL_STORAGE
- // ]);
- // }
}
// social sharing plugin / iPad popover coords
if (device && (device.platform !== "browser")) {
@@ -263,15 +218,19 @@ define(function (require) {
this.onInitDB();
} else if (device.platform === "Android") {
- // Android -- use the device itself
+ // Android -- scoped storage wonkiness introduced in stages starting with API 30
+ // first check the data directory, then check the "default" location
db_dir = cordova.file.dataDirectory;
- // now attempt to get the directory
+ console.log("db_dir: " + db_dir);
+ // // now attempt to get the directory
window.resolveLocalFileSystemURL(db_dir, function (directoryEntry) {
- console.log("Got directoryEntry. Attempting to create / open AIM DB at: " + directoryEntry.toURL());
+ console.log("Got directoryEntry. Attempting to create / open AIM DB at: " + directoryEntry.nativeURL);
// Attempt to create / open our AIM database now
- window.Application.db = window.sqlitePlugin.openDatabase({name: DB_NAME, androidDatabaseLocation: directoryEntry.toURL()});
- window.Application.checkDBSchema().then(window.Application.onInitDB()); // Android only (iOS calls directly)
- // window.Application.onInitDB();
+ window.Application.db = window.sqlitePlugin.openDatabase({name: DB_NAME, androidDatabaseLocation: directoryEntry.nativeURL}, function(db) {
+ window.Application.checkDBSchema().then(window.Application.onInitDB()); // Android only (iOS calls directly)
+ }, function (err) {
+ console.log("Open database ERROR: " + JSON.stringify(err));
+ });
}, function (err) {
console.log("resolveLocalFileSustemURL error: " + err.message);
});
@@ -370,7 +329,7 @@ define(function (require) {
onStart: function (app, options) {
// check the database schema now that we've created / opened it
- this.checkDBSchema();
+ // this.checkDBSchema();
},
// Routes from AppRouter (router.js)