Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZoneMinder/zmNinja
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Nov 28, 2023
2 parents 4c3b250 + 2694cde commit 5aef6b7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.zoneminder.zmNinja" version="1.7.000" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.zoneminder.zmNinja" version="1.7.002" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>zmNinja</name>
<description>
High performance ZoneMinder client
Expand Down Expand Up @@ -109,6 +109,7 @@
<preference name="MixedContentMode" value="2" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<config-file parent="/*" target="AndroidManifest.xml">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
</config-file>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:usesCleartextTraffic="true" />
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion www/js/NVR.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 20 additions & 0 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5aef6b7

Please sign in to comment.