Skip to main content
Contributor II
October 15, 2024
Solved

Push notification for React Native Android while app is closed

  • October 15, 2024
  • 11 replies
  • 1266 views

Hello,
I have Klaviyo integrated in my react native app with `klaviyo-react-native-sdk`. When I’m sending test notifications from campaign it works well with iOS version. But there is one issue on Android version when app is closed.
Notifications on Android are not displayed when app is closed probably because they don’t include ‘notification’ payload (only ‘data’) so Android won’t show it. I can’t see any option in Klaviyo dashboard to set custom payload for push notifications. Is it somehow manageable?

(I can display notification properly while app is in the background or in the foreground but not when it’s closed)

Thank you

Best answer by markpiana

@xcapistr have you seen this similar community post? See the bullet specifically about data vs notification messages.

 

11 replies

markpiana
Klaviyo Employee
Klaviyo Employee
August 25, 2025

Hi all,

As reiterated a few times, Klaviyo intentionally uses data messages as outlined in our SDK docs.

Note: Klaviyo uses data messages to provide consistent notification formatting. As a result, all Klaviyo notifications are handled via onMessageReceived regardless of the app being in the background or foreground. If you are working with multiple remote sources, you can check whether a message originated from Klaviyo with the extension method RemoteMessage.isKlaviyoMessage.”

Make sure that you’re using KlaviyoPushService to handle notifications from Klaviyo. When using KlaviyoPushService , we have not been able to reproduce any issues with notifications not appearing when the app is closed. 

Also if you are using Expo, please see our new Expo plugin, which may simplify development for you.

Thanks,

Mark