i want to show persistant notification in flutter, as when someone calling you while your app is in the backround/terminat state notification shown, unless the user accept or reject it, want to achieve this functionality how can i acheive this.
i tried this but not working
notifications.show(20,
title,
description,
const NotificationDetails(
android: AndroidNotificationDetails(
"20",
"App",
importance: Importance.max,
priority: Priority.high,
autoCancel: false,
ongoing: true,
visibility: NotificationVisibility.public,
category: AndroidNotificationCategory.alarm,
fullScreenIntent: true,
audioAttributesUsage:
AudioAttributesUsage.voiceCommunicationSignalling,
actions: <AndroidNotificationAction>[
AndroidNotificationAction('accept_action', 'Accept'),
AndroidNotificationAction('reject_action', 'Reject'),
],
),
iOS: DarwinNotificationDetails(
presentAlert: true,
presentSound: true,
presentBadge: true,
)),
);