cancel
Showing results for 
Search instead for 
Did you mean: 

Rooms and invites

pjenness
Level 8
Hiya

Just trying to get my head around how OVR rooms, apps and invites work together


Lets say I make an app "mySocialApp", that a player and some friends own/can access

If a player starts the app..does it automatically generate a room for that app , or must I (as the dev) make sure the app generates a room.

My app is a social space, so I want 1 consistant room for anytime the app is open that all players initially access. I guess similar to a lobby, except I  actually skip any lobby system and everyone starts in the first level. (at the moment)


I want a player to be albe to look at their menu and see friends that are online, but not yet in app, and then "invite" them to join the app.

I see I can ovr_Room_InviteUser
https://developer3.oculus.com/documentation/platform/latest/sdk-reference/request-room-invite-user/ ;

But does that invitation automatically load the same app if accepted, or does it only add them to a logical OVRroom?

My goal is that a friend would accept the invite (say from oculus home) and it starts up the app.

Cheers

-P






Drift VFX Visual, Virtual , Vertical Want 970GTX on Macbook for good FPS? https://forums.oculus.com/viewtopic.php?f=26&t=17349
1 REPLY 1

charles_beyer
Level 4
pjenness, Rooms are not automatically created, so you as the developer will need to create them.  To create a user-owned room, you add the create room call somewhere in your App.  Sounds like your use-case however is for a developer-owned room, which we call a moderated room.  You can create this with web call: 

POST https://graph.oculus.com/room_moderated_create?max_users=<max_users>&access_token=<app access token>

Users can invite friends to a room.  They'll get an invite notification and accepting it will cause the App to launch.  However the App doesn't automatically join the room.  You need to add some code to detect that the app was launched this way, parse the room ID, then use the API call to join the room.

There is a Unity example app in the SDK, VrVoiceChat, that uses rooms and invites to coordinate connecting peers.