Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo Interactive Push Notifications

I'm trying to send interactive push notifications with Expo. I can send normal push notifications fine, and I can even send local interactive push notifications, however I cannot send remote interactive push notifications

According to this section of the docs, you create a category, which I do:

Notifications.createCategoryAsync('daily_question', [
    {
        actionId: 'yes',
        buttonTitle: 'Yes',
    },
    {
        actionId: 'no',
        buttonTitle: 'No',
    },
]);

The working local notification then sends (with the interactive buttons) like this:

Notifications.presentLocalNotificationAsync({
    title: '...',
    body: '...',
    data: {...},
    categoryId: 'daily_question',
});

Is there a way to either:

  1. Send a remote interactive push notification as specified in this section of the docs with the _category key
  2. Send a "background" push notification and have a background task send a local interactive push notification
like image 317
Enijar Avatar asked May 31 '26 13:05

Enijar


1 Answers

Try this snack, I tried it on iOs and when I click (long enough) on the notifications, it shows custom action (button One, button two, three),

like image 66
Souhaieb Avatar answered Jun 02 '26 04:06

Souhaieb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!