Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The alarm doesn't stop. #254

Open
cho-4 opened this issue Oct 15, 2024 · 3 comments
Open

The alarm doesn't stop. #254

cho-4 opened this issue Oct 15, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@cho-4
Copy link

cho-4 commented Oct 15, 2024

Alarm plugin version
4.0.3

Describe the bug
Even if I force close the app in the background, the alarm sound does not stop. Of course, I tried Alarm.stop() using dispose() or didChangeAppLifecycleState, but it still doesn't stop.
Oh, and on iOS, after I stop the alarm, the alarm doesn't come back on as set until I restart the app.

Device info
galaxy s21, iphone XS max

@cho-4 cho-4 added the bug Something isn't working label Oct 15, 2024
@gdelataillade
Copy link
Owner

Hi @cho-4,

Thanks for your interest in the package.

Android: Indeed, if app is killed alarm keeps ringing. It will continue to ring until Alarm.stop is called. An alarm can be stopped with the notification action button STOP, which you can set using the NotificationSettings parameter.

iOS: I'm not sure to understand your concern, but unfortunately no alarm can ring if app was killed on iOS.

Let me know if you have any questions.

@cho-4
Copy link
Author

cho-4 commented Oct 15, 2024

Thank you for your reply @gdelataillade

android: I'll try it according to your answer

ios: For example, when I press the set alarm button, the alarm does Alarm.set(), and when I turn off the alarm, it does Alarm.stop. However, I set the alarm time again and pressed the set alarm button, but the alarm did not sound even when the time I set reached. This problem does not occur if I close the app once and run it again.

Oh, and it looks like an additional problem has arisen. I set the alarm to go off after about 8 hours, put the app in the background, and waited, but it didn't go off, only on iOS. When you were testing, did the alarm go off when you set and waited this long?

I'll wait for your reply. Thank you.

@gdelataillade
Copy link
Owner

Hi @cho-4

  1. Could you share some code and/or a screen recording showing the issue please ?

  2. Yes, I tested my alarms waiting for several days. It can happen that iOS intentionally kills your app if it has a too important memory usage and it needs to free the memory. Using Xcode you can see a Memory Report where you can analyse the memory usage of your app. It could be interesting to check that.

Advice: first, in order to know whether the issue comes from the package code or from your app code, please test the example app of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants