How can I make the screen wake up (even if it is locked), when a Notifee message appears?
I thought that when a message appears in background state, it will make the screen wake up, but it remains sleeping.
This is my attempt and config:
// Display a notification
await notifee.displayNotification({
id: 'default',
title: notification.message?.title,
body: notification.message?.body,
android: {
category: AndroidCategory.CALL,
vibrationPattern: [300, 500],
lights: ['red', 300, 600],
channelId,
smallIcon: 'ic_launcher', // optional, defaults to 'ic_launcher'.
importance: AndroidImportance.HIGH,
visibility: AndroidVisibility.PUBLIC,
pressAction: {
id: 'default',
launchActivity: 'default',
// launchActivity: 'com.awesome.app.CustomActivity',
},
fullScreenAction: {
id: 'full-screen',
mainComponent: 'custom-component',
// For Android Activity other than the default:
launchActivity: 'com.awesome.app.FullScreenActivity',
},
// asForegroundService: true,
actions: [
{
title: 'Answer',
pressAction: {id: 'answer', launchActivity: 'default'},
},
{
title: 'Cancel',
pressAction: {
id: 'decline',
},
},
],
},
});