Listening for Events
Confused about "Listening for Events"?
Let us know how we can improve our documentation:
As soon as you call watch
on a Channel or queryChannels
you’ll start to listen to these events. You can hook into specific events:
You can also listen to all events at once: (Full list of events is on events object page)
Client Events
Copied!Confused about "Client Events"?
Let us know how we can improve our documentation:
Not all events are specific to channels. Events such as the user's status has changed, the users' unread count has changed, and other notifications are sent as client events. These events can be listened to through the client directly:
Connection Events
Copied!Confused about "Connection Events"?
Let us know how we can improve our documentation:
The official SDKs make sure that a connection to Stream is kept alive at all times and that chat state is recovered when the user's internet connection comes back online. Your application can subscribe to changes to the connection using client events.
Stop Listening for Events
Copied!Confused about "Stop Listening for Events"?
Let us know how we can improve our documentation:
It is a good practice to unregister event handlers once they are not in use anymore. Doing so will save you from performance degradations coming from memory leaks or even from errors and exceptions (i.e. null pointer exceptions)