Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

react native firebase handle click action on push notification

$
0
0

I'm working on my react native application and i'm sending push notifications using firebase :

in my component i imported librairies :

import firebase from '@react-native-firebase/app'import messaging from '@react-native-firebase/messaging'

I add native configuration to receive notification in foreground and background mode for IOS and Android.

Now i want to add a click action to redirect to specific component .

I use Postman to send POST request with custom data :

    {"to" : "ceWTvUKphPk:APA91bG6CMyiHZfNnpIs76QyThECegzztWe5hjp05jrKU8ImyWwarprqRYFlY3Hry_Xbv0EV0W76PEgHf7ssMzJbaTOzGvmoZthZnWOm9ZGcpwtZ0ubcHY-ps-9yl-sdM-aGrh1bGbrn","notification" : {"body" : "un nouveau partage","title" : "un partage de contact reçu","priority" : "high","vibration":true,"sound": "Enabled","badge":1,"requireInteraction": true,"click_action": "ACTION", },"data" : {"body" : "nouvelle opportunité","title" : "un nouveau partage""content_available" : true,"priority" : "high", } }

How can i create a click action and handle this action for both IOS and Android


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>