Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Local Notifications Action for the web

$
0
0

@lizmun wrote:

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). :confused:

Please let me know if I am missing something.

I am using;
@ionic/react: v5
capacitor

Any help would be really appreciated. Thank you.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>