title: How to create alarms on a flutter application for Android and iOS?
body: <p>I'm trying to make an app where my user would be able set multiple countdown timers and be alerted when they are finished.</p>
  
  <p>It needs to keep running and be precise even if the app is closed.</p>
  
  <p>It needs to ring (default alarm sound) and vibrate. Only vibrate if sound is off. But do both if the device is on Do Not Disturb mode (after all he set the alarms himself).</p>
  
  <p>It needs to show a the alarm name and have a button to dismiss/turn it off even if screen is off or if he is using other apps.</p>
  
  <p>Previously I was using a BroadcastReceiver to open an activity that would do all that, but it doesn't seem to be working with flutter using a channel and native code on Android.</p>
  
  <p>And according to <a href="https://developer.android.com/guide/components/activities/background-starts" rel="noreferrer">this</a> I should use high priority notifications instead.</p>
  
  <p>And I'm also kinda new to Flutter, so I've been trying with channels, pendingintents, broadcastreceivers and a second native activity to show the alarm message with a dismiss button. It's not working. It shows the native activity only if the flutter app is on foreground.</p>
  
  <p>I see there are a few plugins like intents, Alarm_manager and local notifications for flutter that should do it but I can't find a way to fulfill all my needs with them.</p>
  
  <p>So I'm asking the pros: what's the best way to achieve this? </p>