Parties and Party Chat
This is a Platform SDK feature requiring Data Use Checkup
To use this or any other Platform SDK feature, you must complete a Data Use Checkup (DUC). The DUC ensures that you comply with Developer Policies. It requires an administrator from your organization to certify that your use of user data aligns with platform guidelines. Until the app review team reviews and approves your DUC, platform features are only available for test users.Parties allow users to voice chat with friends in Meta Horizon Home. For example, a group of friends can start a party in Home and chat about the game that they want to play together. Then, when they launch the app their chat session continues while in that app.
You may wish to disable party chat if your multiplayer app also provides a voice chat feature.
Users can create a Party and start a voice chat with members of the party and they can invite friends to join them. Party voice chat persists across apps in VR and users can continue to interact while navigating between apps. This can cause issues if your app has a voice chat feature.
Apps for children can't use Platform SDK features
If you self-certify your app as primarily for children under 13, you must avoid using Platform SDK features. This restriction ensures compliance with age-specific guidelines. To ensure compliance, the Data Use Checkup for your app is disabled.Getting the current party
To get the current party, call the following API:
Oculus.Platform.Parties.GetCurrent()
Note: If the user is not in a party, the request will return a resulting Error response with code 10. The error message is “Server response is not valid JSON.”
No integration is required to support parties; however, there are some things you should consider if you are planning to use the microphone for commands or chat in your app. Following is a list of the kinds of chat a user could participate in.
- System VoIP, also called Party VoIP, is the VoIP service used in Parties and Horizon Home. This service does not require an integration and is available to any user.
- Platform VoIP is the VoIP service provided by the Meta Horizon platform and one of the options to integrate voice chat in your app. For more information, see Voice Chat (VoIP).
- Application VoIP is any non-Meta Quest VoIP service that you use in your app.
This page reviews how your app can use the microphone for chat or commands in collaboration with Party/System VoIP.
Options for VoIP in apps that target Link PC-VR devices
If you’re planning implement VoIP in your application, either the Platform VoIP or Application VoIP, you’ll need to handle two chat streams.
Multiple chat streams example Let’s walk through an example handling multiple chat streams:
- Aya and Betty are in a party
- Aya launches an application that Kai is playing
- Aya invites Kai to a multiplayer game
Unless you handle this scenario, Aya will then be able to talk to Betty (on Party VoIP) and Kai (on Application or Platform VoIP), but Betty and Kai will not be able to hear each other.
One way to handle this is to suppress the Party VoIP stream and add Kai to the Application VoIP to avoid this conflict.
- You suppress the Party VoIP
- Kai is added to the Application VoIP
- Aya, Betty, and Kai can talk together
Meta Quest provides a System VoIP API that you can use to detect if the user is in a party and using (System VoIP), and allows you to disable a VoIP stream.
To use the System VoIP API, first check the status of the System VoIP to see whether the user status is active.
There are two ways to check the state of System VoIP. 1. check every frame and 2. listen for a notification.
Check Every Frame - To check whether System VoIP is active at any time, using the following function. Note that this is a synchronous function, not a request:
Voip.GetSystem VoIPStatus() == System VoIPStatus.Active
Listen for a Notification - To get a notification for changes in the VoIP state you can make the following request:
In Unity listen for MessageType.Notification_Voip_System VoIPState
that has a Message<System VoIPState>
from which you can access the Status field, or call SetSystem VoIPStateNotificationCallback
with a Message<System VoIPState>
callback.
It’s possible for the state to change quickly. The values you extract from notification messages will be the state at the time the notification was added to the message queue, which may be different from the state then the message is processed. You may wish to listen for the notification, and then ignore its values and check the current state using the synchronous functions.
Next, you can suppress the VoIP stream that you don’t want the user to hear or allow the user to hear the stream that they choose.
If the System VoIP is active you can:
- Enable In-App VoIP For a User - Use this option if you want the user to be in your in-app chat instead of their party chat. Suppress System VoIP by calling
Platform.VoIP.SetSystemVoipSuppressed(bool suppressed)
, then use either Platform VoIP or your own VoIP service to run the app VoIP. - Enable System/Party VoIP For a User - Use this option if you want to allow the user to continue using their party chat instead of the app VoIP. Suppress your in-app VoIP (don’t send the user’s mic input to other users and don’t play other user’s audio to the user). If you’re using Platform VoIP, information about suppressing that VoIP stream can be found on the Voice Chat (VoIP) page.
System VoIP will be unsuppressed if the app that has it suppressed quits. You may also wish to stop suppressing a user’s party VoIP when they leave the multiplayer portion of your app, e.g. your home menu, so that they may resume chatting with their party.
You may also allow your users to toggle between System VoIP and your in-app VoIP. This allows users to choose if they want to keep talking to their party (in which case you would need to suppress your in-app VoIP), or if they want to use your in-app VoIP (in which case you would need to suppress the System VoIP).
Note: The following methods are intended for Android development.
Manage shared microphones using mic switcher
Android only allows one device to access the microphone at a time. So, Meta has developed the Mic Switcher functionality to allow users to choose between System VoIP and Party VoIP. See the
Mic Switcher docs for more information.