Hello, I’m trying to set up interactive notifications based on the documentation . I’ve created the category using the setNotificationCategoryAsync() and provided all necessary fields. However when I receive the notification the actions defined in for that category are not applied at all.
is there any working example for this , so far anything related to this topic is outdated .
If you have some sample code, someone here may be able to suggest something. One thing that’s really important is to make sure that identifier/ categoryIdentifier match up between the category and the notification (see here).
thank you so much for taking the time to provide an answer , unfortunately the code is a production code therefor I will not be able to share it here . However I did follow the documentation you referred to as I mentioned in my first post. I’ve noticed one thing though. my identifier has “@” and “/” in it could that be an issue ?
my indentifier looks like this @xxx/xxx and and I set the categories by doing the following based on the documentation Notifications.setNotificationCategoryAsync(@xxx/xxx, [ { identifier: "identifier1", buttonTitle: "title1, }, { identifier: "identifier2", buttonTitle: "title2, }, { identifier: "identifier3", buttonTitle: "title3, }, ]);
when I console log the categories using Notifications.getNotificationCategoriesAsync().then((c) => console.log("CATEGORY", c) );
identifer looks like identifier:@xxxxxx notice the slash(“/”) is removed.
also the documentation says : Don’t use the characters : or - in your category identifier. If you do, categories might not work as expected.. this seems to suggest that categoryIdentifier can be anything. but your answer suggests that it has to match the experienceId which we have no control over . This is very confusing
is there any working implementation of this? all examples of this functionality are outdated and the docs don’t cover much
thanks so much for your help . the categoryId was the missing piece as it’s not mentioned anywhere in the docs . some say it’s _category which is what I was using . This should be documented .