zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.76k stars 2.05k forks source link

can't use remote notifications #1807

Closed FatemeMirzaeii closed 3 years ago

FatemeMirzaeii commented 3 years ago

Question

Hi everyone I have followed installation setup in the document step by step, but still I can't receive remote notifications from firebase console. I think I have some version mismatches or missed installing some dependencies, is there other libraries need to be installed that has not been mentioned in the document? or I'm seeing 'senderId' property that some old toturials used in their configure function,do we still need that?

I'm using react-native-push-notification version 6.1.1

Dallas62 commented 3 years ago

Hi @FatemeMirzaeii

Did you setup a channel ? https://github.com/zo0r/react-native-push-notification#channel-management-android

You can also refer to the exemple project.

Regards,

FatemeMirzaeii commented 3 years ago

I created 2 channels with 'default-channel-id' and 'sound-channel-id' Ids. I have used the exact NotificationHandler and NotifService in the example project. should I have changed channelId?

Dallas62 commented 3 years ago

Did you define a default channel in your AndroidManifest, or setup the "android channel id" in the FCM console ?

FatemeMirzaeii commented 3 years ago

yeah I have done them too.

but I fixed. I checked my console again and saw its instruction too, I found that I don't have this: implementation platform('com.google.firebase:firebase-bom:26.2.0') in my app/build.gradle

adding that fixed my problem. thanks a million