Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
Expo notification click to action

I can't seem to find a solution when I get a push notification and click on it redirects me to a screen, chat, etc. link to push notification.

I would also like to add a square image to the side and could not find an answer.

enter image description here

The push notifications are sent from a NodeJS server I looked at the docs and search the internet and I did not find anything of interest.

https://docs.expo.dev/versions/latest/sdk/notifications/#managing-notification-categories-interactive-notifications

https://github.com/expo/expo-server-sdk-node

Thank you in advance for your answers ❤️

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm not quite sure about the square image, but in order to handle redirects you can look at this documentation from expo: https://docs.expo.dev/push-notifications/receiving-notifications/.

You can then pass the data you need for your redirect (i.e. notification_type, relevant id etc) via the data property on your message (this will need to be done wherever the message is created, which from your question is from the node api):

messages.push({
  to: pushToken,
  body: 'This is a test notification',
  data: { notification_type: 'something', id: 'something_else' },
});

It is then up to you to decide how to handle that message based on the extra data you have provided.

For example, taking the code provided in the link above as an example, you could have a handle function as follows:

_handleNotification = response => {

    const data = response.notification.request.content;
    if (data.type === "new_message") {
       // navigate to MessageScreen with data.id as param
    } else {
       // do something else based on the type or...
    }
};
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!