I have the plugin working and I can send notifications to a specific user. I pass the contents object to the postNotification method, but the push notification received uses the same message as the header and the body. Is there a way to pass both a title and a message?
let data = {'test':'hello'}
let contents =
{
'en': message
}
OneSignal.postNotification(contents,data,this.state.userPushKey)
The current API supports contents only, i'll work on extending this API to send a parameters JSON object instead.
@avishayil That would be awesome! Thanks!
+1
Any updates on this feature?
Hi @MEDLJosh , sorry but I haven't found the time to handle this yet.
Any help would be appreciated.
Hello everyone,
The heading can be passed through the othersParameters parameter:

An example:

The parameters can be found at:
https://documentation.onesignal.com/reference#create-notification
Hope this helps,
Most helpful comment
Hello everyone,
The heading can be passed through the othersParameters parameter:

An example:

The parameters can be found at:
https://documentation.onesignal.com/reference#create-notification
Hope this helps,