why deepstreamHub? compare us getting started faq
use cases
products
developers
company
blog contact

The entry point for presence, allowing clients to subscribe to and query for other connected clients.

Methods

getAll()

String[] getAll()
Queries for all connected clients. This will return a string array of usernames or user IDs depending on whether you're connected to deepstream or deepstreamHub. The query will also not contain the clients own user ID. Show example...

subscribe(listener)

void subscribe(PresenceEventListener presenceListener)
argument type description
listener PresenceEventListener The listener that will be fired when a user logs in

Subscribes the client to all client logins, note that only users who login with credentials (ie. not OPEN) will trigger the PresenceEventListener.

Show example...

unsubscribe(listener)

void unsubscribe(PresenceEventListener presenceListener)
argument type description
presenceListener PresenceEventListener The listener to remove

Unsubscribes from an event that was previously registered with subscribe(listener). This stops a client from receiving the event.

Show example...