diff --git a/config.xml b/config.xml index b092d09ba..1eae94c5b 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + zmNinja High performance ZoneMinder client @@ -109,6 +109,7 @@ + diff --git a/package.json b/package.json index 6bac1fe3b..e08854f3d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version": "1.7.000", + "version": "1.7.002", "displayName": "zmNinja", "author": "Zoneminder Inc, Pliable Pixels", "repository": { @@ -89,7 +89,7 @@ "cordova-plugin-advanced-http": "3.3.1", "cordova-plugin-advanced-websocket": "^1.1.6", "cordova-plugin-android-fingerprint-auth": "^1.5.0", - "cordova-plugin-android-permissions": "^1.1.3", + "cordova-plugin-android-permissions": "^1.1.5", "cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-app-version": "^0.1.14", "cordova-plugin-customurlscheme": "^5.0.2", diff --git a/www/js/NVR.js b/www/js/NVR.js index 6b073b307..dcc954fd1 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -22,7 +22,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.7.000"; + var zmAppVersion = "1.7.002"; var isBackground = false; var justResumed = false; diff --git a/www/js/app.js b/www/js/app.js index e039cbeca..ebbf446bf 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1135,6 +1135,26 @@ angular.module('zmApp', [ NVR.log("You are running on " + $rootScope.platformOS); + if ($rootScope.platformOS == 'android') { + var permissions = cordova.plugins.permissions; + permissions.checkPermission(permissions.POST_NOTIFICATIONS, checkPermissionCallback, null); + + function checkPermissionCallback(status) { + if (!status.checkPermission) { + NVR.log("No permission to post notifications"); + } + permissions.requestPermission(permissions.POST_NOTIFICATIONS, succ, err); + } + } + + function succ(s) { + NVR.log("Got permission to post notifications"); + } + + function err(e) { + NVR.log("Error in requestPermission"); + } + $rootScope.appName = "zmNinja"; $rootScope.zmGlobalCookie = ""; $rootScope.isEventFilterOn = false;