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

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

Open
MrSucik opened this issue Sep 19, 2024 · 4 comments
Open
Labels
Keep Open this label avoids the stale bot

Comments

@MrSucik
Copy link

MrSucik commented Sep 19, 2024

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 🙏

@infiniteline
Copy link

My code is running with SDK 34 and RN 0.74. One of the only differences I see in my code is that instead of:

alarmManager: true,

I have:

alarmManager: { allowWhileIdle: true, }

@MrSucik
Copy link
Author

MrSucik commented Oct 8, 2024

thanks for the suggestion, unfortunately that does not change the result 😿

@3sluz
Copy link

3sluz commented Oct 17, 2024

Same issue

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 Nov 29, 2024
@mikehardy mikehardy reopened this Nov 29, 2024
@mikehardy mikehardy added Keep Open this label avoids the stale bot and removed Type: Stale labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Keep Open this label avoids the stale bot
Projects
None yet
Development

No branches or pull requests

4 participants