You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was using custom audios in Android and for iOS, Android is working good, but in iOS these are the problems.
1 - Notification sound too slow when notify.
2 - When using custom sound Notifications not working in iOS.
Describe the bug
I was using custom audios in Android and for iOS, Android is working good, but in iOS these are the problems.
1 - Notification sound too slow when notify.
2 - When using custom sound Notifications not working in iOS.
To Reproduce
Expected behavior
Sample code to reproduce the problem
static Future init() async {
const AndroidInitializationSettings initializationSettingsAndroid =
AndroidInitializationSettings('logo');
final DarwinInitializationSettings initializationSettingsDarwin =
DarwinInitializationSettings(
onDidReceiveLocalNotification: (id, title, body, payload) =>
Get.toNamed(AppRoutes.home, arguments: 3),
requestSoundPermission: true,
requestAlertPermission: true,
);
const LinuxInitializationSettings initializationSettingsLinux =
LinuxInitializationSettings(defaultActionName: 'Open notification');
final InitializationSettings initializationSettings =
InitializationSettings(
android: initializationSettingsAndroid,
iOS: initializationSettingsDarwin,
linux: initializationSettingsLinux,
);
}
static Future showScheduleNotifications({
required DateTime notificationTime,
required String bodyText,
String? audio,
}) async {
try {
int notificationId = notificationTime.millisecondsSinceEpoch ~/ 1000;
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
notificationId.toString(),
notificationId.toString(),
channelDescription: notificationId.toString(),
importance: Importance.max,
priority: Priority.high,
ticker: 'ticker',
sound: RawResourceAndroidNotificationSound(audio),
enableVibration: true,
);
NotificationDetails notificationDetails = NotificationDetails(
android: androidNotificationDetails,
iOS: const DarwinNotificationDetails(),
);
}
The text was updated successfully, but these errors were encountered: