flutter – iOS Notification Sound Settings

0
18
flutter – iOS Notification Sound Settings


I’m unsure why my customized sound, which is about 29 seconds lengthy, disappears after about 8 seconds when the notification is triggered. What settings ought to I modify to make sure the notification stays energetic with my 29-second sound? Do I would like to change the AppDelegate.swift or information.plist?

NotificationChannel(
  channelKey: "alarm_Category",
  channelName: "alarm_Category",
  channelDescription: 'Notification exams as alerts',
  defaultColor: Colours.blue,
  ledColor: Colours.white,
  playSound: true,
  onlyAlertOnce: false,
  significance: NotificationImportance.Max,
  soundSource: 'useful resource://uncooked/notification_sound',
  criticalAlerts: true,
  enableVibration: true,
  enableLights: true,
  ledOnMs: 1000,
  ledOffMs: 500,
  locked: true,
),


await AwesomeNotifications().createNotification(
        content material: NotificationContent(
          class: NotificationCategory.Alarm,
          fullScreenIntent: true,
          backgroundColor: Colours.black,
          id: subId,
          channelKey: "alarm_Category",
          title: DateFormat('yyyy.MM.dd HH:mm').format(currentNotificationTime),
          physique: 'Alarm Memo: ${schedule.enteredText}',
          payload: {
            'subId': subId.toString(),
            'enteredText': schedule.enteredText,
            'categoryIdentifier': "alarm_Category",
            'identifier': "alarm_Category",
            'channelKey': "alarm_Category",
            'class': "alarm_Category",
          },
          displayOnForeground: true,
          displayOnBackground: true,
          autoDismissible: false,
          locked: true,
          icon: 'useful resource://drawable/ic_launcher',
          customSound: 'useful resource://uncooked/notification_sound',
          showWhen: true,
          wakeUpScreen: true,
          criticalAlert: true,
        ),
        schedule: NotificationCalendar(
          repeats: true,
          preciseAlarm: true,
          yr: currentNotificationTime.yr,
          month: currentNotificationTime.month,
          day: currentNotificationTime.day,
          hour: currentNotificationTime.hour,
          minute: currentNotificationTime.minute,
          second: currentNotificationTime.second,
        ),
      );

LEAVE A REPLY

Please enter your comment!
Please enter your name here