On SDK 39 we got support for interactive notifications for the new notification API.
I’ve implemented it like so:
Notifications.setNotificationCategoryAsync("chat", [
{
actionId: "replyToMessage",
identifier: "replyToMessage",
buttonTitle: i18n.t("general.reply"),
textInput: {
submitButtonTitle: i18n.t("general.reply")
},
isDestructive: false,
isAuthenticationRequired: false,
options: {
opensAppToForeground: false
}
}])
and on Android I managed to get it working, albeit using _category
instead of categoryIdentifier
as the docs suggest. On iOS it just straight up doesn’t work, no matter what I try. So either this is broken or I’m doing something wrong.
This is the request being sent:
{
"to": "ExponentPushToken[************]",
"title":"hello",
"body": "world",
"categoryId": "chat",
"categoryIdentifier": "chat",
"_category": "chat"
}