cancel
Showing results for 
Search instead for 
Did you mean: 

API: Is there an event that we can subscribe to when a friend online status changes?

tmacharla
Level 3

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.

1 ACCEPTED SOLUTION

Accepted Solutions

tmacharla
Level 3

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.

View solution in original post

1 REPLY 1

tmacharla
Level 3

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.