-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add channel #699
add channel #699
Conversation
Bugfixes for sdk-26 branch
Update from master
Please merge this ! I need it and it's working fine for me ! |
By the way i tested this on Android 8 and Android 7.1 (and iOS in case of breaking), and local notification are working <3 |
@Titozzz you can target this branch in your npm. |
There are 2 reasons why the PR is not merged.
|
…nto evollu-master
Update to master
Update from evollu
Update SDK-26 Branch from master
I am still not getting any notification icon when the app is in background, but the app is getting the data in registerKilledListeners as per the example. Any idea how can I get the icon in the notification shade? I am using sdk-26 branch of
|
|
@evollu, yes its banner(notification icon) is not showing up but the app receives the notification payload. This is happening in devices running on android 8+, before I had upgraded the SDK to 26 everything was working as it is. Do I need to do any additional setup for 8.0 devices? |
@evollu I have created a notification channel by referring this: https://github.com/invertase/react-native-firebase-docs/blob/master/docs/notifications/android-channels.md Now I can see the notification channel listed in |
@evollu its finally working, needed to send
Added channel creation in registerListeners: export function registerAppListener(openPushNotification, handleOpenURL) {
const channel = new firebase.notifications.Android.Channel('default',
'Notification', firebase.notifications.Android.Importance.Max)
.setDescription('Receive notifications');
// channel id is set as: default
// Create the channel
firebase.notifications().android.createChannel(channel);
} The channel id in the notification payload should match the one given while channel creation. |
According to the example of the changes, your registerAppListener can be replaced with FCM.createNotificationChannel({
id: 'default',
name: 'Default',
description: 'general usage',
priority: 'high'
}) |
the app crashes because of
compile "com.android.support:support-core-utils:26.1.0"