Skip to content

[Android 14] Scheduled notifications are not displayed when app is killed #1100

@MrSucik

Description

@MrSucik

Hello and thank you for work on this package it helped us a lot to deliver useful products for child healthcare.

Recently we've updated to Android SDK 34 and RN 0.72 and suddenly notifications are only displayed when app is open. When closed, notifications are not displayed.

I've already checked:

  1. App notification permissions are enabled
  2. App battery settings are in non-restrict mode
  3. App alarm permissions are enabled
  4. Notification channel is setup with AndroidImportance.HIGH

The code we use to schedule the notification looks something like this:

await notifee.createTriggerNotification(
  {
    android: {
      channelId: "123",
      importance: 4,
      largeIcon: "ic_launcher",
      pressAction: {
        id: "default",
        launchActivity: "default",
        launchActivityFlags: [Array],
      },
      showTimestamp: true,
      sound: "default",
      visibility: 1,
    },
    body: "xxx",
    title: "xxx",
  },
  {
    alarmManager: true,
    repeatFrequency: 2,
    timestamp: 1726902000000,
    type: 0,
  }
);

Note: Even when alarmManager is undefined or false the result is the same.

When this code triggers notification 10 seconds from now it shows correctly, but if I close the app within these 10 seconds the notification is not shown.

Help would be much appreciated. Thanks 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    Keep Openthis label avoids the stale bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions