Forum Discussion
SL_Tej
3 years agoExplorer
API: Is there an event that we can subscribe to when a friend online status changes?
Hi,
We are working on a Quest 2 multiplayer PvP game and on app launch we check for entitlements.
And once the user is entitled, we use the Oculus User Api `Users.GetLoggedInUserFriends()` to get the logged in player's friends and get the Oculus User data for each friend using `Users.Get(userId)`.
Is there an event that we can subscribe to when any friend's online status changes i.e., online to offline (or) offline to online, so that we don't have to keep polling/requesting the Oculus User info for each friend using `User.Get(userId)` to know their current online status.
Usecase: Player A has friend Player B and we get the user data of Player B at the start of the app which includes the online status.
When Player B's online status changes (becomes online from offline or becomes offline from online), an event is fired and using that we want to update the online status for Player B in the UI.
Is there an event like that?
Thank you.
I also posted this question on the first access forum and got a reply saying this
Unfortunately we don't have an event like that and you would have to poll the friends manually.
So polling is the only option as of now.
1 Reply
Replies have been turned off for this discussion
- SL_TejExplorer
I also posted this question on the first access forum and got a reply saying this
Unfortunately we don't have an event like that and you would have to poll the friends manually.
So polling is the only option as of now.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 7 months ago
- 1 year ago