For my react-native project, I am using Onesignal api to send notifications to users with action buttons Yes & No.
When I receive notification it shows action buttons only when long press the notification.
As shown below: When I receive it looks like this:
If I long press the notification then only it shows action buttons:
This is how I send notification with action buttons.
{
contents: {
en: "Are you coming to work today?"
},
app_id: OneSignalAppID,
// included_segments: ["Subscribed Users"],
include_player_ids: [...],
priority: 10,
buttons: [{
id: "yes-feedback", text: "Yes"
},
{ id: "no-feedback", text: "No" }
]
},
I Have tried to look on how to make custom buttons but could not find anything yet. Also I have seen some apps' notifications shows button popped out already without pressing it so its probably doable but not sure where to start.