React Native + Firebase Cloud Messaging + Stream.io + Android push notifications not working

17 views Asked by At

I have an app using Expo 50 + React Native running in Android 33.

I'm using the service Stream.io for chat infrastructure + Firebase Cloud messaging for push notifications.

My integration works well in iOS, but for Android push notifications don't arrive. I'm using a Pixel 7 Pro with Android 33, running on a simulator.

What am I doing in code?

  1. I'm asking for notification permissions using: PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS)
  2. I'm then getting the device token using Firebase's message function like this: messaging().getToken()
  3. I'm storing the device token inside Stream.io using:
client.setLocalDevice({
   id: token,
   push_provider,
   push_provider_name,
});

There are no errors in code after running this.

When sending a message, I see Stream.io sends the message to Firebase Cloud Messaging. Here's an example log.

enter image description here

What am I doing wrong?

0

There are 0 answers