0

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:

enter image description here

If I long press the notification then only it shows action buttons: enter image description here

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.

newdeveloper
  • 1,401
  • 3
  • 17
  • 43

1 Answers1

1

I'm sure you know this by now, but that is standard behavior for iOS. The notification action buttons only show up if you long press or "view" the notification. Good Luck!

CompWitch
  • 44
  • 1
  • 5