From 1e5aba30670797668c4eaec6930c2c914c7e306d Mon Sep 17 00:00:00 2001 From: Edoardo Gallo Date: Mon, 15 Dec 2014 17:57:27 +0100 Subject: [PATCH 1/2] Fix ios notification when app was in background --- Boxcar.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Boxcar.js b/Boxcar.js index 50cdb86..239203d 100644 --- a/Boxcar.js +++ b/Boxcar.js @@ -297,10 +297,18 @@ var Boxcar = { if (fromNotificationClick && _this.onnotificationclick) _this.onnotificationclick(msg); }, function() { - if (_this.onalert) - _this.onalert(msg) - if (fromNotificationClick && _this.onnotificationclick) + /** + Fire twice ?!?!?! + */ + // if (_this.onalert) + // _this.onalert(msg) + // if (fromNotificationClick && _this.onnotificationclick) + // _this.onnotificationclick(msg); + if( fromNotificationClick && _this.onnotificationclick ){ _this.onnotificationclick(msg); + }else if (_this.onalert) { + _this.onalert(msg) + } }); }, @@ -493,7 +501,7 @@ var Boxcar = { window.plugins.pushNotification.setApplicationIconBadgeNumber(function(){}, function(){}, msg.badge); }catch(ex){console.info("EX ", ex)} - Boxcar._gotMessage(msg, !data.foreground); + Boxcar._gotMessage(msg, !Number(data.foreground)); } }; From 4d5eccd9e79a67c953af9661d1856075706f7efa Mon Sep 17 00:00:00 2001 From: Edoardo Gallo Date: Fri, 31 Jul 2015 16:49:32 +0200 Subject: [PATCH 2/2] Removed dependency for plugin cordova-deviec --- plugin.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugin.xml b/plugin.xml index eede47c..47643b8 100644 --- a/plugin.xml +++ b/plugin.xml @@ -6,27 +6,28 @@ BoxcarPlugin Pawel Chmielowski - + Boxcar push platfrom access plugin for Android and iOS. MIT - + - - + + - + +