0.0.2 • Published 7 years ago

meteor-desktop-system-notifications v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

meteor-desktop-system-notifications

A plugin for meteor-desktop that enabled native system notifications/toasts and icon badges

On the Meteor side you can do the following:

  • To set a badge on the app's icon
Desktop.send('systemNotifications', 'setBadge', unreadCount);
  • To show a system notification
Desktop.send('systemNotifications', 'notify', {
    title: 'Title',
    text: 'Text',
    icon: 'Icon Url',
    data: {
        someVar: 'someValue',
    },
});
  • To handle click on a notification
Desktop.on('systemNotifications', 'notificationClicked', (sender, data) => {
    //handle click
    //data is the data object you passed to notify
});

Lots more to do