From 5ec73700e033cd67a0571a51dd40e050f3a395b9 Mon Sep 17 00:00:00 2001 From: Shankari Date: Wed, 2 Sep 2020 10:14:12 -0700 Subject: [PATCH] Add additional debugging statements for the trip end notification launch --- www/js/tripconfirm/post-trip-prompt.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/js/tripconfirm/post-trip-prompt.js b/www/js/tripconfirm/post-trip-prompt.js index e9b011427..2f6db87e0 100644 --- a/www/js/tripconfirm/post-trip-prompt.js +++ b/www/js/tripconfirm/post-trip-prompt.js @@ -141,6 +141,7 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger' ptap.registerUserResponse = function() { Logger.log( "registerUserResponse received!" ); $window.cordova.plugins.notification.local.on('CHOOSE', function (notification, eventOpts) { + Logger.log("Trip End Notification CHOOSE received"); if (!checkCategory(notification)) { Logger.log("notification "+notification+" is not an mode choice, returning..."); return; @@ -150,6 +151,7 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger' displayCompletedTrip(notification, eventOpts); }); $window.cordova.plugins.notification.local.on('SNOOZE', function (notification, eventOpts) { + Logger.log("Trip End Notification SNOOZE received"); if (!checkCategory(notification)) { Logger.log("notification "+notification+" is not an mode choice, returning..."); return; @@ -167,6 +169,7 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger' } }); $window.cordova.plugins.notification.local.on('MUTE', function (notification, eventOpts) { + Logger.log("Trip End Notification MUTE received"); if (!checkCategory(notification)) { Logger.log("notification "+notification+" is not an mode choice, returning..."); return; @@ -214,13 +217,15 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger' }); $window.cordova.plugins.notification.local.on('clear', function (notification, eventOpts) { // alert("notification cleared, no report"); + Logger.log("Trip End Notification cleared"); }); $window.cordova.plugins.notification.local.on('cancel', function (notification, eventOpts) { // alert("notification cancelled, no report"); + Logger.log("Trip End Notification cancelled"); }); $window.cordova.plugins.notification.local.on('trigger', function (notification, eventOpts) { // alert("triggered, no action"); - Logger.log("Notification triggered"); + Logger.log("Trip End Notification triggered"); if (!checkCategory(notification)) { Logger.log("notification "+notification+" is not an mode choice, returning..."); return; @@ -242,7 +247,7 @@ angular.module('emission.tripconfirm.posttrip.prompt', ['emission.plugin.logger' }); $window.cordova.plugins.notification.local.on('click', function (notification, eventOpts) { // alert("clicked, no action"); - Logger.log("Notification, click event"); + Logger.log("Trip End Notification, click event"); if (!checkCategory(notification)) { Logger.log("notification "+notification+" is not an mode choice, returning..."); return;