0

I'm building an app on iOS and Android using react-native without the Salesforce Mobile SDK.

I want to be able to send Push Notification to the app using Salesforce PushNotification class in Apex. All the setup for the connected app and the mobile app is done, and they can communicate.

The problem comes in the structure of the payload sent from the PushNotification class, that's like :

{message : {data : JSON, from : String, messageId : String, ttl : Int}}

It seems that the payload is corresponding to a "data only" notification, thats is not displayed when the app is killed (Not in background)

Can I change the payload structure to be a notification message without creating my own class of PushNotification ? With a payload like this :

{message : {notification : JSON, from : String, messageId : String, ttl : Int}}

Thanks !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.