# I want to be notified when someone sends a message in Open Channel

**URL:** <https://community.sendbird.com/t/i-want-to-be-notified-when-someone-sends-a-message-in-open-channel/3951>\
**Category:** Sendbird Chat UIKit\
**Tags:** android, uikit, question\
**Created:** [February 16, 2022, 7:01am UTC](https://community.sendbird.com/t/i-want-to-be-notified-when-someone-sends-a-message-in-open-channel/3951 "2022-02-16T07:01:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manishahire](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/manishahire/32/1668_2.png) [@manishahire](https://community.sendbird.com/u/manishahire)\
**Post date:** [February 16, 2022, 7:01am UTC](https://community.sendbird.com/t/i-want-to-be-notified-when-someone-sends-a-message-in-open-channel/3951/1 "2022-02-16T07:01:55Z")

</div>

Greetings!

My question is that how can I get notified when the Open Channel user sends a message.

I have read the past question and found that SendBird not allow push notification for Open Channel, i am good with it.

I just want to know is that any handler available that can handle the new messages outside of Open Channel Fragment, means Open Channel fragment is not active.

---

<div class="post-metadata">

**Author:** ![LeoShin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/leoshin/32/397_2.png) [@LeoShin](https://community.sendbird.com/u/LeoShin)\
**Post date:** [February 16, 2022, 7:54am UTC](https://community.sendbird.com/t/i-want-to-be-notified-when-someone-sends-a-message-in-open-channel/3951/2 "2022-02-16T07:54:17Z")

</div>

Hi @manishahire

I’m not sure that this is what you want to find.  
You can receive new messages by [this](https://sendbird.com/docs/chat/v3/android/quickstart/send-first-message#2-get-started-3-step-9-receive-a-message). When the event is called you need to check whether the coming message is a current channel.

```auto
SendBird.addChannelHandler(UNIQUE_HANDLER_ID, new SendBird.ChannelHandler() { // Replace the `UNIQUE_HANDLER_ID` with a unique identifier for this handler.

    @Override
    public void onMessageReceived(BaseChannel baseChannel, BaseMessage baseMessage) {
         if (baseChannel.getUrl().equals(currentChannel.getUrl()) {
             // do something
         }
    }
});

```

---

<div class="post-metadata">

**Author:** ![manishahire](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/manishahire/32/1668_2.png) [@manishahire](https://community.sendbird.com/u/manishahire)\
**Post date:** [February 16, 2022, 8:47am UTC](https://community.sendbird.com/t/i-want-to-be-notified-when-someone-sends-a-message-in-open-channel/3951/3 "2022-02-16T08:47:53Z")

</div>

> [@LeoShin](#):
>
> ```auto
> SendBird.addChannelHandler(UNIQUE_HANDLER_ID, new SendBird.ChannelHandler() { // Replace the `UNIQUE_HANDLER_ID` with a unique identifier for this handler.
> 
> @Override
> public void onMessageReceived(BaseChannel baseChannel, BaseMessage baseMessage) {
> if (baseChannel.getUrl().equals(currentChannel.getUrl()) {
> // do something
> }
> }
> });
> 
> ```

Thank you @LeoShin for quick response, let mi check is this code works for me.
