Hi everyone,
I was trying to use the local notifications (https://capacitor.ionicframework.com/docs/apis/local-notifications)
LocalNotifications.schedule({
notifications: [
{
id: 1,
title: 'Hello',
body: 'World',
schedule: { at: new Date(Date.now()) },
extra: null,
},
],
});
// adding the listener
LocalNotifications.addListener('localNotificationActionPerformed', (payload) => {
// triggers when the notification is clicked.
console.log('notification triggered:', payload);
});
It works as expected on iOS… but on the (web) browser, nothing happens after clicking the notification (i.e. no console.log).
Please let me know if I am missing something.
I am using;
@ionic/react: v5
capacitor
Any help would be really appreciated. Thank you.