-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Package versions
"react-native": "0.82.0",
"@notifee/react-native": "^9.1.8"
Device details
Model: Vivo Y56
OS: Android 15 (FuntouchOS 15)
Reproducibility: 100% on Vivo Y56, works fine on Samsung and other phones
App permissions: Notification permission granted, battery optimization disabled
Exact alarm permission: Granted (SCHEDULE_EXACT_ALARM declared and allowed)
Issue description
When using notifee.createTriggerNotification with a TriggerType.TIMESTAMP and AlarmType.SET_EXACT_AND_ALLOW_WHILE_IDLE, notifications are not shown when the device is idle (screen off) for a few minutes.
If the app is open or in background, the same code triggers perfectly.
It seems that the scheduled alarm is not waking the device or being fired in idle/Doze state — possibly related to Notifee’s internal use of AlarmManager on specific OEMs (Vivo).
Steps to reproduce
Install app on Vivo Y56 (Android 15).
Schedule a trigger notification for 5 minutes later.
Turn screen off and leave phone idle (no background activity) for 5+ minutes.
Wait for the notification time.
Observed: No notification displayed.
Expected: Notification should fire and display even in idle state.
Code used
import notifee, {
AndroidImportance,
AndroidVisibility,
AndroidCategory,
TriggerType,
AlarmType
} from '@notifee/react-native';
import { DateTime } from 'luxon';
// background handlers
notifee.onBackgroundEvent(async ({ type, detail }) => {
updateNotification(type, detail);
});
notifee.onForegroundEvent(async ({ type, detail }) => {
updateNotification(type, detail);
});
// schedule trigger
const triggerTimestamp = DateTime.now().toMillis() + 5 * 60 * 1000;
await notifee.createTriggerNotification(
{
id: 'reminder-1',
title: 'Test Reminder',
body: 'This is a 5-minute test notification',
data: { type: 'reminder', id: 'reminder-1' },
android: {
channelId: 'reminder-channel',
smallIcon: 'ic_small_icon',
vibrationPattern: [300, 500],
color: '#6200EE',
sound: 'alarm',
visibility: AndroidVisibility.PUBLIC,
importance: AndroidImportance.HIGH,
onlyAlertOnce: true,
loopSound: true,
category: AndroidCategory.ALARM,
},
},
{
type: TriggerType.TIMESTAMP,
timestamp: triggerTimestamp,
alarmManager: {
allowWhileIdle: true,
type: AlarmType.SET_EXACT_AND_ALLOW_WHILE_IDLE,
},
}
);
What I’ve verified
✅ Works on Samsung and Pixel devices.
✅ Permissions granted (POST_NOTIFICATIONS, SCHEDULE_EXACT_ALARM).
✅ App removed from battery optimization and background restrictions.
✅ allowWhileIdle: true and correct timestamp used.
Expected behavior
The notification should trigger and display even when the device is idle or in Doze mode, similar to other Android devices.
Observed behavior
No notification is displayed after idle period.
When app is in foreground or background (active session), it works as expected.