ionic-frameworkionic4localnotificationcapacitorheads-up-notifications

Capacitor local notification heads up


I'm using Capacitor with Ionic 4 Framework. When I schedule a local notification, it appears in the statusbar correctly with the passed parameters, but it does not appear like a popup. I was reading about this and is named "Heads up" notification, which has additional priority parameters. There is a parameter in Capacitor Local Notification plugin which let me show a notification as a Heads up?


Solution

  • Unfortunately not, i just posted how you could get around this if you customize the plugin in the Issue tracked for Capacitor.

    Basically the creation of the android channel is hardcoded in the plugin to an IMPORTANCE of 3, if you set that to MAX (5) then the chennel will enable the heads up notification.

    For older versions of Android, you will want to override the default Priority in the plugin as well.

    https://github.com/ionic-team/capacitor/issues/2261