evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

React Native Firebase v6 can't handle click_action #1133

Open khaledBou opened 4 years ago

khaledBou commented 4 years ago

I'm working on push notifications for my react native using firebase 6 cloud messaging . I'm working on macOS : System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz Memory: 241.00 MB / 24.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.14.1 - /usr/local/bin/node Yarn: 1.22.0 - ~/.yarn/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Android Studio: 3.5 AI-191.8026.42.35.6010548 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5 npmGlobalPackages: react-native-cli: 2.0.1 react-native: 0.61.5

I use Samsung A50 with Android 9 as device .

I'm sending a post request to show notification and there's no documentation about handling click action when push is received.

Currently i'm sending :

{ "to" : "token", "notification" : { "body" : "un nouveau partage", "title" : "un partage de contact reçu", "priority" : "high", "vibration":true, "sound": "Enabled", "badge":1, "requireInteraction": true, "click_action": "fcm.ACTION.HELLO" }, "data" : { "body" : "nouvelle opportunité", "title" : "un nouveau partage", "content_available" : true, "priority" : "high" } }

temitope commented 4 years ago

Notification support is removed in v6 see here - https://github.com/invertase/react-native-firebase/issues/2566#issuecomment-562700412