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

Notification not showing while Alarm ring #200

Open
Riyaz7364 opened this issue May 9, 2024 · 4 comments
Open

Notification not showing while Alarm ring #200

Riyaz7364 opened this issue May 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working needs author feedback Further information or answer is requested by author

Comments

@Riyaz7364
Copy link

Alarm plugin version
3.1.3

Describe the bug
Notification not showing on the screen while Alarm trigger. To stop the Alarm I have to force store the app. There must be a stop button and also when I set the alarm again while is running current alarm will stop, I think there must be a button to store the alarm then set another alarm

Expected behavior
There must be a notification which show with title and body and the bottom to stop the alarm and stop must have a trigger to callback funtion

Device info
Samsung a23, Android 13

@Riyaz7364 Riyaz7364 added the bug Something isn't working label May 9, 2024
@gdelataillade
Copy link
Owner

Hi @Riyaz7364

To stop the alarm you have to call the Alarm.stop method. In the future when I'll find the time I'll add a stop button to the notification: #58
When you set an alarm with the same id as an existing one, it will stop the existing one and replace it with the new one. If you want to manage your alarms separately, you need to use different ids.

Am I answering your questions ?

@gdelataillade gdelataillade added the needs author feedback Further information or answer is requested by author label May 9, 2024
@CntrlX
Copy link

CntrlX commented May 12, 2024

No actually i have this error tooo there is no notification when it rings

@gdelataillade
Copy link
Owner

Hi @CntrlX

Your notifications never show ? Make sure you asked for the notification permission. See permission_handler.

@fimpact-nicole
Copy link

fimpact-nicole commented May 14, 2024

@Riyaz7364 @CntrlX
If you're using alarm package with flutter_local_notifications package, in my case, I had to write the code in the following order to make it work properly in main.dart. Just in case!

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await FlutterLocalNotificationsPlugin().initialize(settings: ...);

  await Alarm.init();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs author feedback Further information or answer is requested by author
Projects
None yet
Development

No branches or pull requests

4 participants