Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

248
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda