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:
- Send a remote interactive push notification as specified in this section of the docs with the
_category
key - Send a "background" push notification and have a background task send a local interactive push notification
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:
- Send a remote interactive push notification as specified in this section of the docs with the
_category
key - Send a "background" push notification and have a background task send a local interactive push notification
- 1 Same issue on Android. have you managed to work around this? – Sello Mkantjwa Commented Apr 20, 2019 at 20:37
- 1 @Enijar Did you ever figure out a solution to this? – Squirrl Commented Apr 5, 2020 at 17:22
- medium./@mvspavs/expo-notifications-171ba5ab951d – Shub Commented Oct 30, 2024 at 7:14
2 Answers
Reset to default 1Try 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),
I got remote interactive push notifications working by sending the category id with the key categoryId
.