Skip to content

Channel State

A subscribed channel can be one of the following two states: joined or left. A joined channel is active and all messaging listeners/callbacks received published messages. When a channel is in the left state, the subscription is put on hold and no messages arrive to the added listeners/callbacks. When a channel subscription is established, the initial state is joined. The following API provides access to control channel's state:

Leaving Channel

channel.leave();

Joining Channel

channel.join();

Checking Status

boolean joined = channel.isJoined();