Local notifications not working when app is closed or killed

#1

Hi,
We are making an app with ionic 3 that gives some reminders to users.So we use local notifications
https://ionicframework.com/docs/native/local-notifications/ plugin from ionic native.We also included sound for the reminder. The plugin works fine when the app is running.But when i closed the app or killed i didnt receive any notifications that i scheduled :frowning: . I did spent more time on searching about this issue.Many persons faced this.But there is no proper fix for this bug. Anyone know about fix for this or please suggest me any other ionic plugin for reminder. Note:It should give notifications even when app is killed.

1 Like
#2

Is this documented anywhere?

Please provide links to issues on the actual Cordova plugin Github that mention this problem: https://github.com/katzer/cordova-plugin-local-notifications/issues

#3
#4

Is this on iOS or android? Are these repeating reminders or single? What OS versions have you tested on?

Beyond those major questions that you need to figure out, I’d also recommending trying to use the Telerik fork of the notification plugin and see if your code works: https://github.com/Telerik-Verified-Plugins/LocalNotification

And yes it should work even if your app is not running. Once you register the notification with the OS, the OS makes the notification appear, doesn’t matter what your app is doing.

#5

@rlouie Your given Github link not supported for the IONIC application. Do you have any alternate for the same? @IonicGeoff Do you have any idea?

#6

I can’t give you a solution right now, but I’ve also used this Plugin in one of my apps and there was now problem with notifications when the app was closed or killed. I can confirm that the notifications have continued to work. I remember sending a notification every minute telling me my current position using background geolocation.

Tipp: Capacitor provides a API for Push Notifications without using an external plugin :slight_smile:

#7

I guess you need to verify if the notification was registered in the first place?

Have you tried any of the methods available to check this?

#8

Hi,
You have to create a Background Service, this can help you :slight_smile: https://github.com/Red-Folder/bgs-core/wiki/Build-your-own-Background-Service