From ddebfee8b1d01e9cfd3e511bdaa372cdf51dd181 Mon Sep 17 00:00:00 2001 From: Yemel Jardi Date: Thu, 17 Jul 2014 16:52:32 -0300 Subject: [PATCH] Add vibration and system notifications --- js/services/notifications.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/services/notifications.js b/js/services/notifications.js index 4c3c00e4b..bd8dc1920 100644 --- a/js/services/notifications.js +++ b/js/services/notifications.js @@ -198,7 +198,12 @@ factory('notification', ['$timeout', $timeout(function removeFromQueueTimeout() { queue.splice(queue.indexOf(notification), 1); }, settings[type].duration); + } + // Movile notification + window.navigator.vibrate([200,100,200]); + if (document.hidden && (type == 'info' || type == 'funds')) { + new window.Notification(title, {body: content}); } this.save();