react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

onNotificationOpened, onNotification is not triggered

Open cx5168 opened this issue 8 years ago • 4 comments

Android 8 is unable to receive messages. Android 7 can receive messages, but clicking messages can not call listener methods(onNotificationOpened, onNotification). and getInitialNotification method is always returning null.

Environment: OS: Windows 10 Node: 8.11.3 Yarn: 1.7.0 npm: 5.6.0 Watchman: Not Found Xcode: N/A Android Studio: Not Found

Packages: (wanted => installed) react: 16.3.0 => 16.3.0 react-native: 0.54.4 => 0.54.4

reaect-native-firebase: 4.3.8

\android\app\build.gradle: implementation "com.google.firebase:firebase-messaging:17.3.0" implementation "com.google.android.gms:play-services-base:15.0.1" implementation "com.google.firebase:firebase-core:16.0.3"

Other configurations are set correctly according to the document.

please help me!

cx5168 avatar Sep 04 '18 08:09 cx5168

Android 8 is unable to receive messages: This problem has been solved. The solution is as follows:

const channel = new Firebase.notifications.Android.Channel
(‘default_channel_id’,'aa',Firebase.notifications.Android.Importance.Max)
.setDescription('your description');
Firebase.notifications().android.createChannel(channel);

However, the listener method(onNotificationOpened, onNotification) has not been triggered.

any idea?

cx5168 avatar Sep 07 '18 04:09 cx5168

Same issue

aaalive avatar Sep 10 '18 15:09 aaalive

Moving to https://github.com/invertase/react-native-firebase/issues/1443

Ehesp avatar Sep 11 '18 10:09 Ehesp

same here

Edison4mobile avatar Feb 14 '19 20:02 Edison4mobile