When you need a quick and easy way to notify your users about things happening in your app at a later point you can use local notifications which look like a push notification (more on the difference later) and can be implemented with just a few lines.
In this Quick Win we will implement the local notification plugin and schedule a notification for a later point, send additional data and subscribe to events in order to receive our payload data.
The full quick win with snippets is only available to Ionic Academy members.
Join now for
- Unlimited access to all quick wins
- Library of 40+ step-by-step video courses
- Support for Ionic questions via Slack & private community
Current member? LOGIN
Hi Simon greate work, thanks.
I wouder if you got the sound to work, i would like to play a sound file when a notification triggers. I tryied this code as the manual tells us. but did not get it to work. Any ide?
cordova.plugins.notification.local.schedule({
title: “New Message”,
message: “Hi, are you ready? We are waiting.”,
sound: “file://sounds/message.mp3”,
icon: “http://my.domain.de/avatar/user#id=123”
});