Add vibration and system notifications

This commit is contained in:
Yemel Jardi 2014-07-17 16:52:32 -03:00
parent bf2f801bea
commit ddebfee8b1
1 changed files with 5 additions and 0 deletions

View File

@ -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();