Push notifications not displaying when the app is in foreground
We're having an issue with push notifications. When the app is running in the foreground, push notifications are not displaying after we successfully trigger the event. However, after we open an app and trigger an even, the push will appear at once.
12 Replies
@Support Hey, guys, sorry any comment on this?
@Yolanta
Can you share the code snippet you are using to trigger the workflow?
Hi, Pawan! Sure!
import { Novu } from '@novu/node';
const novu = new Novu('<API_KEY>');
novu.trigger('push-inactive', {
to: {
subscriberId: '<REPLACE_WITH_DATA>'
},
payload: {}
});
@Yolanta, you just advanced to level 1!
After the trigger is activated:
Do you need a snippet after the trigger is activated?
@Pawan Jain Hi, Pawan! We are still exepriencing the same issue. Sorry, I wanted to write "bckground" in the original message. We are not receiving messages when the app is running in the background, which defeats the purpose of push notifications.
@Pawan Jain Hey, guys, it's been a week, still not response from you @Support @DevRel
@Product
@Yolanta
Checkout this guide. We have trigger example. Are you sending overrides data?
https://docs.novu.co/integrations/providers/push/fcm#sdk-trigger-example
Hi, Pawan, thank you very much for your response! 🙏 We don't use override, because we use Novu interface button for triggering and sending push notifications. Is it possible to fix the issue on the Novu side? Or override is something which we have to set up even if we want to do everything from the Novu interface?
want*
@Yolanta
Novu dashboard have override field. currently, override is necessary
Hi, Pawan! Thank you very much for your response! 🙏 It helped when we included an override. Still not working properly on Chinese devices though, but I guess it can't be solved on the Novu's side? You know, some Chinese devices do not display notificaitons in the background for the sake of battery optimization.
@Yolanta, you just advanced to level 2!