LocalNotifications Capacitor V3 has no working basic examples

@netkow

The documentation for this V3 is extremely lacking.

Please can someone from the core team (or community) give an example of what the schedule needs to be, so that it works for each of the following:

  1. Schedule a DAILY notification at a specific time, e.g. Every DAY at 15:00
  2. Schedule a WEEKLY notification at a specific time, e.g. Every WEEK at 15:00
  3. Schedule a SPECIFIC DAY OF THE WEEK notification at a specific time, e.g. Every WEDNESDAY at 15:00

Searched everywhere, tried lots of things and not getting anything reliable working.

At the moment if I do:

      var d = new Date();

      schedule = {
        on: {
          hour: d.getHours(),
          minute: d.getMinutes()
        },
        allowWhileIdle: true
      };

I can get a daily notification appearing, but it always says it’s late by 1d or 2d from whenever I’d first set it, not ‘Now’ or ‘Today’.

Thank you

1 Like

Answered this myself, posted here for anyone stuck:

This is a work around due to lack of documentation in Capacitor and obvious bugs, since there is no indication from team when/if it’ll be fixed/documentation updated.

Hope this helps someone else.

Hey Dave, the final release of Capacitor 3 hasn’t shipped yet, so there may be gaps in documentation.

You’re correct, we need some examples for sure. Will check into it. Thanks.

1 Like