notifee icon indicating copy to clipboard operation
notifee copied to clipboard

Getting only one notification even I send multiple messages.

Open nareshkopanathi opened this issue 1 year ago • 1 comments

I am getting only one notification even I send multiple messages but in Android 11 version I am getting multiple messages but above versions I am not getting multiple messages.

export async function sendNotification(notificationData: NotificationModal) { try { await notifee.requestPermission();`

const channelId = await notifee.createChannel({
  id: 'default',
  name: 'Default Channel',
  importance: AndroidImportance.HIGH,
});

const notificationId = uuid.v4()?.toString();
const colorScheme = Appearance.getColorScheme();
const isDarkMode = colorScheme === 'dark';
const titleColor = isDarkMode ? '#FFFFFF' : '#000000';
const bodyColor = isDarkMode ? '#FFFFFF' : '#020C04';

if (Platform.OS === 'android') {
  await notifee.displayNotification({
    title: `<span style="color: ${titleColor}"><b>${notificationData.subTitle}</b></span>`,
    body: `<span style="color: ${bodyColor}">${notificationData.body}</span>`,
    data: notificationData,
    id: notificationId,
    android: {
      channelId,
      pressAction: {
        id: 'default',
      },
    },
  });
}

if (Platform.OS === 'ios') {
  await notifee.displayNotification({
    title: 'KB Home Employee',
    subtitle: notificationData.subTitle,
    body: notificationData.body,
    data: notificationData,
    id: notificationId,
    ios: {
      sound: 'default',
      categoryId: channelId,
    },
  });
}

await notifee.incrementBadgeCount(1);

} catch (err) { console.error('Error in sendNotification:', err); } } `

buildToolsVersion = "34.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "25.1.8937393" kotlinVersion = "1.8.0"

nareshkopanathi avatar Jul 29 '24 12:07 nareshkopanathi

plz some one help me

nareshkopanathi avatar Jul 30 '24 10:07 nareshkopanathi

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[bot] avatar Aug 27 '24 11:08 github-actions[bot]