Basic Usage
Discover the basic functionality of the ALO Javascript Presence SDK.
Initialize a Connection to the Presence Service
Once the Presence
class is initialized, a connection will be automatically established and a connected
event will be fired to all subscribers of the specified userId
.
Listening for Changes in Presence
Use watch
and subscribe
to listen for any connected
or disconnected
events associated with a list of userIds
.
Response Props
Type | Description | |
eventType | string (enum) | Will be either "connected" or "disconnected". |
userId | string | The associated |
deviceId | string | The associated |
Get Presence On-Demand
The hereNow
function lets you specify which userIds
you want to are online
and which devices
along with each device's last_active
.
last_active
is never greater than 300 seconds (5 minutes) ago.
Last updated