gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 85 forks source link

Auto stop alarm sound after dismiss notification #30

Open wiztensai opened 1 year ago

wiztensai commented 1 year ago

Hi, thanks for the great package.

The alarm is show while i am opening app. Then, how to auto stop alarm sound after user dismiss notification?

gdelataillade commented 1 year ago

Hi @wiztensai

Thank you for your interest in the package !

I'm not sure I understand your request. Can you please explain with more details or explain step by step the behavior you would like to expect.

wiztensai commented 1 year ago

Precondition:

Step:

Expected behaviour:

Reality:

So, how to stop alarm after user swipe out the notif? Thanks

gdelataillade commented 1 year ago

This would be a great feature to add to the plugin. I don't have much time to dedicate to the project, but I will probably develop it sooner or later. Feel free to contribute though.

LesYampolskyi commented 1 year ago

It looks like the creators of local_notification don't provide such functionality. There are no callbacks for the dismissed event

You can only stop the alarm by clicking on the notification. It is not implemented in this alarm package. If it is needed, I can create a pull request with this feature. I've tried it on ios device, but I think it will also work with android because there is no platform specific code.