Will the notification work even if the application is terminated on iOS devices (I.e not running in either foreground or background)? Like if I scheduled a date and time for a notification, and the application is terminated (not running) during the scheduled time, will the application still display a notification on the device?
In addition to my question, I'm building a reminder like application for iOS device using phonegap, and I set the app so that the app is terminated when user clicked home button. So just wondering if the notification will still fire up even if the app is terminated by displaying an alert with sound?
Yes, the app will send down local notifications if they are scheduled and the app is terminated OR the app is suspended.
Clicking on the home button doesn't terminate the app though. You need to swipe-kill it to terminate it, pressing the home button will put it in the background and then at some time in the next X minutes the app will suspend.
Rob
Thanks. Yes I know pressing home won't terminate the app but I've changed the setting in UIApplicationExitsOnSuspend so that my app will terminate when home button is pressed (which is what I want the app to do).
@katzer I have this problem of notification not triggered when app is not in the running state (neither in the background). Is it device specific ? I have a Xiaomi device. If yes, how to overcome this ?
@natanraj
This thread is specifically about IOS devices. I suggest you start a new one rather than hijacking it with a new topic altogether.
Rob
In this case where the notification is delivered (triggered) while the app itself is no longer running, can you comment on the events expected? The documentation indicates that if the user swipes the notification then the OS will launch the app and deliver the event when using .on('click'). I use this feature and it works great. What can be expected with the other events? In particular I am interested in if the on('trigger') event will reach my app, and if so, when and under what circumstances? Will the OS launch the app and deliver it? Or will it be queued until the next time app launches? If it launches into the background (such as when a geo-fence region fires) will it be delivered then? What is expected to occur vs. what is the current state of the software (i.e. are there currently issues still to be resolved?)
One of the only events that seem to be fired when the app is not running or in the background is 'click'.
The app is started and the event is delivered correctly.
I don't recall 'trigger' being fired.
We don't use geofence. Well we do, but our geofence software is custom built and uses r-trees, along with complex and concave polygons.
I'm not the author of the software so cannot comment on the software.
Closed as no response from original poster in three months.
local notification not working when the app is terminated. Any suggestion?
@shivalipawar do you get the solution? I have same problem?
Local notifications are not working when app terminated,For android devices as well as IOS Devices
For this i installed following plugin
"de.appplant.cordova.plugin.local-notification 0.8.5"
My requirement is even app closed or killed local notifications need to work
For iOS : It depends on the notification category, there is 3 categories, you can trigger Local notifications by TimerInterval, Calendar and Location. As far as I know, only Calendar notifications can be triggered even if your app is killed (not in background), because it is the Calendar App who will wake up your app.
@natanraj
This thread is specifically about IOS devices. I suggest you start a new one rather than hijacking it with a new topic altogether.
Rob
I also have the problem that @natanraj had. But I am using android (Android 9 in Samsung Galaxy A10).
The notification is not working when the app is terminated or running in the background for me. The notifications are pushed only when the app is being opened. NOTE: Sorry For Mistakes.
Same issue as @KSahithyan , the application built on react-native and using react-native-push-notifications to schedule multiple local notifications. Local notifications work fine on android 8 test phone but on release mode, i installed on a android 10 One Plus7 phone, and sometimes the notifications do not fires until i open the app (bring to foreground). Tested a few times, out of 10 tests, 4 tests work as expected while other 5 do not fires notifications on time untill app is awake.
For me it feels like a android problem, cause android 8 works fine.
@Jacky9425 yeah bro. I too tested it several times. Then I decided to work on the web (mainly frontend) only 馃榿馃榿.
I also tried react-native. But don't know if it has notification support. just tried it.