Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS handle consecutive push notifications with long sound #1020

Closed
sanduluca opened this issue Apr 1, 2024 · 1 comment
Closed

iOS handle consecutive push notifications with long sound #1020

sanduluca opened this issue Apr 1, 2024 · 1 comment

Comments

@sanduluca
Copy link

Hi all. I have a question regarding ios notifications with sound. So i have a type of notification that has a sound of 25 seconds. The problem if the server sends 2 or 3 consecutive notification with a delay lets say 5 seconds, the notification sounds overlay.

The only solution for now is to cancel the previous notification, but we dont want to remove it from notification center:

const displayedNotifications = await notifee.getDisplayedNotifications();
const prevNotification = displayedNotifications[1];
if(prevNotification?.notification.data?.type === "LONG") {
  notifee.cancelNotification(prevNotification.id);
}

Does anyone know why the iOS doesn't discard the previous notification sound when new notification arrive ? On Android its working fine (following notification discard the sound of current notification if its still playing)

Maybe you know some resources to read about this. I couldn't find a better solution for this

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant