На устройствах с Android 13 и 14 уведомление отображается правильное время, но на Android 15 оно не отображается. Создается нормально, но ничего не происходит. Я заметил, что на первых двух устройствах дата выглядит так
5.12.2024, 14:27:00
12.06.2024, 10: 23:09
но с Android 15
12.06.2024, 01:54:48
Во всех случаях отметка времени верна и проверена.
PD:
В Android 15 с этим кодом уведомление отображается< /p>
async function onDisplayNotification() {
// Request permissions (required for iOS)
await notifee.requestPermission()
// Create a channel (required for Android)
const channelId = await notifee.createChannel({
id: 'default',
name: 'Default Channel',
});
// Display a notification
await notifee.displayNotification({
title: 'Notification Title',
body: 'Main body content of the notification',
android: {
channelId,
smallIcon: 'name-of-a-small-icon', // optional, defaults to 'ic_launcher'.
// pressAction is needed if you want the notification to open the app when pressed
pressAction: {
id: 'default',
},
},
});
} [/code] На устройствах с Android 13 и 14 уведомление отображается правильное время, но на Android 15 оно не отображается. Создается нормально, но ничего не происходит. Я заметил, что на первых двух устройствах дата выглядит так 5.12.2024, 14:27:00 12.06.2024, 10: 23:09 но с Android 15 12.06.2024, 01:54:48 Во всех случаях отметка времени верна и проверена. PD: В Android 15 с этим кодом уведомление отображается< /p> [code] async function onDisplayNotification() { // Request permissions (required for iOS) await notifee.requestPermission()
// Create a channel (required for Android) const channelId = await notifee.createChannel({ id: 'default', name: 'Default Channel', });
// Display a notification await notifee.displayNotification({ title: 'Notification Title', body: 'Main body content of the notification', android: { channelId, smallIcon: 'name-of-a-small-icon', // optional, defaults to 'ic_launcher'. // pressAction is needed if you want the notification to open the app when pressed pressAction: { id: 'default', }, }, }); [/code] }