| Name | Summary |
|---|---|
GroupPresence | constructor() |
| Name | Summary |
|---|---|
Companion | object Companion |
| Name | Summary |
|---|---|
clear | suspend fun clear() Clears the current group presence settings for your app. Use this when a user’s group presence setting in your app needs to be changed when moving to new destinations in your app. |
getInvitableUsers | suspend fun getInvitableUsers(options: InviteOptions): UserArray Returns a list of users that can be invited to your current lobby. These are pulled from your bidirectional followers and recently met lists. |
joinIntentReceived | fun joinIntentReceived(): Flow<GroupPresenceJoinIntent> Sent when a user has chosen to join the destination/lobby/match. Read all the fields to figure out where the user wants to go and take the appropriate actions to bring them there. If the user is unable to go there, provide adequate messaging to the user on why they cannot go there. These notifications should be responded to immediately. Parameter: Callback is a function that will be called when a user has chosen to join the destination/lobby/match. horizon.platform.group_presence.models.GroupPresenceJoinIntent has 4 members: string horizon.platform.group_presence.models.GroupPresenceJoinIntent.deeplinkMessage |
set | suspend fun set(groupPresenceOptions: GroupPresenceOptions) Sets group presence information for your current app. It is recommended that you use this parameter and its methods to set group presence information for your app. An example of using this parameter can be found on the Group Presence overview page where the methods to set ovr_GroupPresenceOptions_SetDestinationApiName(), ovr_GroupPresenceOptions_SetMatchSessionId(), and ovr_GroupPresenceOptions_SetLobbySessionId() are used. |
setDeeplinkMessageOverride | suspend fun setDeeplinkMessageOverride(deeplinkMessage: String) Sets the user’s ovr_GroupPresenceOptions_SetDeeplinkMessageOverride() while keeping the other group presence parameters the same. If the destination of the user is not set, the deeplink message cannot be set as there’s no deeplink message to override. This method does not power travel from the Meta Quest platform to your app. You must set a user’s ovr_GroupPresenceOptions_SetDestinationApiName(), ovr_GroupPresenceOptions_SetIsJoinable() status, and ovr_GroupPresenceOptions_SetLobbySessionId() to enable travel to your app. Check Group Presence overview for more information about these values. Note: Instead of using this standalone API, we recommend setting all GroupPresence parameters in one call to GroupPresence.set(). |
setDestination | suspend fun setDestination(apiName: String) Replaces the user’s current ovr_GroupPresenceOptions_SetDestinationApiName() with the provided one. Use this to set a user’s current destination while keeping all the other Group Presence parameters the same. Setting a user’s destination is required to enable travel from the Meta Quest Platform to your app. NOTE instead of using the standalone API, we recommend setting all GroupPresence parameters in one call to GroupPresence.set(). This helps ensure that all relevant presence information is singularly updated and helps reduce presence errors. |
setIsJoinable | suspend fun setIsJoinable(isJoinable: Boolean) Sets a user’s current presence as joinable. Use this method to update a user’s joinability as it changes. For example, when the game starts, the lobby becomes full, the user moves to a private, non joinable instance while keeping all other GroupPresence parameters (i.e ovr_GroupPresenceOptions_SetDestinationApiName(), ovr_GroupPresenceOptions_SetLobbySessionId(), ovr_GroupPresenceOptions_SetMatchSessionId()) the same. Setting a user’s destination is required to enable travel from the Meta Quest Platform to your app. Note: Instead of using this individual API, we recommend setting all GroupPresence information with the GroupPresence.set() method and its associated parameters to simply managing all presence information. This helps ensure that all relevant presence information is singularly updated and helps reduce presence errors. |
setLobbySession | suspend fun setLobbySession(id: String) Replaces the user’s current ovr_GroupPresenceOptions_SetLobbySessionId() for the provided string. Use this to set a user’s current lobby session id while keeping all other GroupPresence parameters the same. Setting a user’s lobby session id is required to enable travel from the Meta Quest Platform to your app. Check Group presence overview for more information. NOTE instead of using the standalone API, we recommend setting all GroupPresence parameters in one call to GroupPresence.set(). This helps ensure that all relevant presence information is singularly updated and helps reduce presence errors. |
setMatchSession | suspend fun setMatchSession(id: String) Replaces the user’s current ovr_GroupPresenceOptions_SetMatchSessionId() for the provided one. Use this to update the user’s current match session id while keeping all other GroupPresence parameters the same. ovr_GroupPresenceOptions_SetMatchSessionId() works in conjuction with ovr_GroupPresenceOptions_SetLobbySessionId() to determine if users are playing together. If a user’s match and lobby session ids are the same, they should be in the same multiplayer instance together. Users with the same lobby session id but different match session ids may be in the same lobby for things like voice chat while in different instances in your app. WARNING match session id is often treated the same as lobby session id, but this is in fact a distinct parameter and is not used for travel from the Meta Quest Platform. NOTE instead of using the standalone API, we recommend setting all GroupPresence parameters in one call to GroupPresence.set(). |