# Android notifications not working

**URL:** <https://community.sendbird.com/t/android-notifications-not-working/1696>\
**Category:** JavaScript\
**Tags:** group-channel, push-notification, chatsdk\
**Created:** [February 11, 2021, 11:39am UTC](https://community.sendbird.com/t/android-notifications-not-working/1696 "2021-02-11T11:39:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leap](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@Leap](https://community.sendbird.com/u/Leap)\
**Post date:** [February 11, 2021, 11:39am UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/1 "2021-02-11T11:39:26Z")

</div>

Not receiving any notifications in Android devices, whereas its working fine in iOS.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [February 11, 2021, 2:14pm UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/2 "2021-02-11T14:14:37Z")

</div>

Hey @Leap,

Are you building your app in React-Native? What version of the SDK are you utilizing? Does your APP\_ID had an FCM token registered, and does the client whom you expect to receive a notification also have a token registered?

Thanks!

---

<div class="post-metadata">

**Author:** ![Leap](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@Leap](https://community.sendbird.com/u/Leap)\
**Post date:** [February 11, 2021, 4:31pm UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/3 "2021-02-11T16:31:27Z")

</div>

Hey Tyler,

Yes i am building the app in react native and my sendbird package version is 3.0.141. Yes i have added FCM Server key also in the notification settings, and all my users have their fcm token registered in their account also.

Thanks

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [February 11, 2021, 4:33pm UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/4 "2021-02-11T16:33:56Z")

</div>

Thanks for confirming that for me Leap! Could you please DM me your APP\_ID so I can take a look at a couple of things on our end?

Thanks!

---

<div class="post-metadata">

**Author:** ![Leap](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@Leap](https://community.sendbird.com/u/Leap)\
**Post date:** [February 11, 2021, 4:45pm UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/5 "2021-02-11T16:45:01Z")

</div>

how can i send a dm?

---

<div class="post-metadata">

**Author:** ![KmMessapps](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/kmmessapps/32/1402_2.png) [@KmMessapps](https://community.sendbird.com/u/KmMessapps)\
**Post date:** [July 16, 2021, 7:23am UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/6 "2021-07-16T07:23:38Z")

</div>

Hi Leap, Any solution for notification was not received in Android?

---

<div class="post-metadata">

**Author:** ![ruin3936](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/ruin3936/32/1622_2.png) [@ruin3936](https://community.sendbird.com/u/ruin3936)\
**Post date:** [September 15, 2021, 2:48pm UTC](https://community.sendbird.com/t/android-notifications-not-working/1696/7 "2021-09-15T14:48:09Z")

</div>

Hi,

For android, you need to add the following.

index.js

```auto
if (Platform.OS === 'android') {
    messaging().setBackgroundMessageHandler(onRemoteMessage);
}

```

App.(js/tsx)

```auto
useEffect(() => {
    if (Platform.OS === 'android') {
      const unsubscribeHandler = messaging().onMessage(onRemoteMessage);
      return unsubscribeHandler;
    }
}, []);

```

```auto
// onRemoteMessage function
const onRemoteMessage = (remoteMessage) => {
   console.log("A new FCM message arrived!", remoteMessage);
}

```

Hope that helps!
