Push notification no heads up display, vibrate or sound


I have tried to do push notification on android and ios, on the ios it works fine, there is sound and the screen will wake when receiving notification.

However on android, the notification only shows an icon in the status bar, and when the screen is locked it will not wake to show notification. There is notification, but it requires to turn on the screen. What is the issue here? I have set the localNotification stats for the different platforms:
const localNotification = {
title: ‘test title’,
body: ‘test body’, // (string) — body text of the notification.
ios: { // (optional) (object) — notification configuration specific to iOS.
sound: true // (optional) (boolean) — if true, play a sound. Default: false.
android: // (optional) (object) — notification configuration specific to Android.
sound: true, // (optional) (boolean) — if true, play a sound. Default: false.
//icon (optional) (string) — URL of icon to display in notification drawer.
//color (optional) (string) — color of the notification icon in notification drawer.
priority: “max”, // (optional) (min | low | high | max) — android may present notifications according to the priority, for example a high priority notification will likely to be shown as a heads-up notification.
sticky: true, // (optional) (boolean) — if true, the notification will be sticky and not dismissable by user. The notification must be programmatically dismissed. Default: false.
vibrate: true // (optional) (boolean or array) — if true, vibrate the device. An array can be supplied to specify the vibration pattern, e.g. - [ 0, 500 ].
// link (optional) (string) — external link to open when notification is selected.
.then(id => console.info(Immediate notification scheduled (${id})))
.catch(err => console.error(err))

Even when sound and vibrate are true, there is no sound or vibration, nor a heads up display.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.