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


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.

Hi @manishahire

I’m not sure that this is what you want to find.
You can receive new messages by this. When the event is called you need to check whether the coming message is a current channel.

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

    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.