I am developing app using react native and expo & I have to implement push notifications in app. So far sending and receiving the notifications has no issues but my problems are mainly related to UI design on push notification panel :
Following is my simple notification message configuration :
scheduleNotificationAsync({
content: {
title: “You’ve got mail! ”,
body: ‘Here is the notification body’,
data: { data: ‘goes here’ },
},
})
- Is there any way to design multi line notification?
- I can use title, subtitle (which only works in iOS) but I want multiple lines in body part. I tried using \n in my body text but it doesn’t work.
- How to navigate to specific screen in app when button is pressed in notification?
I have setup sample category as below :
Notifications.setNotificationCategoryAsync(“daily_question”, [
{
actionId: “yes”,
buttonTitle: “Yes”,
},
{
actionId: “no”,
buttonTitle: “No”,
},
]);
I would like to navigate to specific screen upon pressing of “Yes/No” button but I’m not able to figure out/able to find out, how I can write any action code in configuration.
-
Is there any way I can design the notification panel content UI part as html/jsx code to have better control over how UI will look like?
-
Is there any way to add image/table kind of components in notification ui?
- It seems like adding image to push notification is under consideration.
Any pointers/guidance on achieving above points using expo notification?
If expo notification, cannot achieve above functionalities then what are my options?
Thanks