Presence
Overview
Online Presence allows an app's users to know which of their friends are currently online, what they are doing, and whether they are available to interact.
The Presence Service enables the tracking of this live user activity. In order for any of these calls to be functional, the Presence feature must be enabled for your app. brainCloud RTT is also required.
See Design | Messaging | Presence in the portal.
API Summary
Basic Presence
The user's online status is automatically registered when they connect to brainCloud RTT. From there, the following API calls can be used to update the user's presence state and activity.
- UpdateActivity - update the user's rich activity data
- SetVisibility - hide the user's online state
Getting Presence Status
The following API calls are used to directly request the presence status of other users:
- GetPresenceOfFriends - get presence of friends
- GetPresenceOfGroup - get presence of specified group
- GetPresenceOfUsers - get presence of specified set of users
Real-time Presence
Use these API calls to configure real-time presence updates:
- RegisterListenersForFriends - register listeners with all friends
- RegisterListenersForGroup - register listeners with the specified group
- RegisterListenersForProfiles - register listeners with the specified list of users (profiles)
- StopListening - deregisters are listeners
- ForcePush - force an update to all listeners
System calls
The system API calls can be used to register presence for users who are not currently connected via RTT. Useful for Internet-of-Things use cases. Callable by cloud-code only.
- SysInitializePresence - initialize presence for the specified user
- SysExtendPxExpiry - extend the presence state
- SysTerminatePresence - terminate presence for the specified user
📄️ ForcePush
Overview
📄️ GetPresenceOfFriends
Overview
📄️ GetPresenceOfGroup
Overview
📄️ GetPresenceOfUsers
Overview
📄️ RegisterListenersForFriends
Overview
📄️ RegisterListenersForGroup
Overview
📄️ RegisterListenersForProfiles
Overview
📄️ SetVisibility
Overview
📄️ StopListening
Overview
📄️ SysExtendPxExpiry
Overview
📄️ SysInitializePresence
Overview
📄️ SysTerminatePresence
Overview
📄️ UpdateActivity
Overview