awesome_notifications icon indicating copy to clipboard operation
awesome_notifications copied to clipboard

NotificationCategory.Alarm does not work on iOS

Open tatraef opened this issue 3 years ago • 3 comments

Tried NotificationCategory.Alarm, on android it repeats the sound until you click on the notification, but not on iOS, the sound is played only once.

NotificationContent(
      id: Random().nextInt(2147483647),
      channelKey: content['channelKey'],
      title: content['title'],
      body: content['body'],
      notificationLayout: NotificationLayout.BigText,
      category: NotificationCategory.Alarm,
    )

Flutter Version : 3.3.0 Awesome Notification Version : 0.7.0-beta.6+1

tatraef avatar Sep 15 '22 15:09 tatraef

Got the same issue with iPhone 13 (iOS 15.5). It seems like what affected this is an app's notification setting called "Banner Style", which is set to "Temporary" by default. After manually switching it to "Persistent", this would behave as expected.

Is there any way to set the "Banner Style" to "Persistent" on runtime when the category is set to NotificationCategory.Alarm?

WillowWisp avatar Sep 22 '22 05:09 WillowWisp

@WillowWisp when you manually switching it to "Persistent", the sound is played many times? I have only once, unlike android, the sound is looped there.

tatraef avatar Sep 22 '22 07:09 tatraef

On iOS calls are not handle by notifications, instead they use CallKit.

Also, on iOS there is not locked / persistent notifications. According our heuristics, Awesome tries to use the maximum resources as possible to create the notifications, but if the resource does not exists, it will be ignored. And there is so much differences between Android distributions as between Android and iOS. Because of that, this is the best approach in most cases.

rafaelsetragni avatar Sep 29 '22 16:09 rafaelsetragni

This issue was automatically closed due inactivity, but can be reopened at any time.

github-actions[bot] avatar Nov 29 '22 08:11 github-actions[bot]