Cancel Notification doesn't cancel anything

Hi everyone,

I have some troubles with the Corona’s notification system. Since I understood scheduleNotification returns a  userdata , which cannot be stocked in a file, I decided to trust the “no parameter” version of the cancelNotification function.

But… it doesn’t work at all. The doc says " If no id is passed, then all notifications are cancelled " but when I try, even if I call cancelNotification( ), the notifications previously launched will still appear at the decided date/hour.

I don’t see any way to make a good notification system without that working, so I was wondering about its debug : will it occur ? Soon or later ? Is there a way to make it work ?

I built the LocalNotifications sample app and installed it on my iPhone.  I did a timed notification, hit the home button so the app wasn’t running in the foreground, got the notification as expected.  I repeated it, but hit the cancelAll button before hitting the home button and I never got a notification.  This would indicate to me that the SampleApp is working as advertised.

Now hitting the cancel button does not stop the countdown timer on the button that got started.  Also, you have to test on device.

Can you try the Sample app and see if it works for you?  If it does, you can compare code with it and see what differences you might have.

Rob

As you recommended, I tried the sample app, which obviously worked.

After some changes my system is now ok, I guess the problem was I called cancelNotification too early. By putting it after (on a button all players have to use), it now works well : thank you !

I built the LocalNotifications sample app and installed it on my iPhone.  I did a timed notification, hit the home button so the app wasn’t running in the foreground, got the notification as expected.  I repeated it, but hit the cancelAll button before hitting the home button and I never got a notification.  This would indicate to me that the SampleApp is working as advertised.

Now hitting the cancel button does not stop the countdown timer on the button that got started.  Also, you have to test on device.

Can you try the Sample app and see if it works for you?  If it does, you can compare code with it and see what differences you might have.

Rob

As you recommended, I tried the sample app, which obviously worked.

After some changes my system is now ok, I guess the problem was I called cancelNotification too early. By putting it after (on a button all players have to use), it now works well : thank you !