Avatar SDK - How to Invite friends — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Avatar SDK - How to Invite friends

WelbyWelby Posts: 1,063 Oculus Start Member
EDIT: I changed the request since i solved the previous one.

I'm now basically trying to figure out how to invite friends. Pressing X will put me in the Oculus Home menu but clicking on friends do nothing. There's something am i missing?

By default every player create his own room.. but i can't understand how to invite people.

Comments

  • WelbyWelby Posts: 1,063 Oculus Start Member
    Yes i followed all the documentation to setup the social starter scene and the sphere in the room is white. 

    So everything works as should but once i press X to invite friends i have the global oculus menu.. but nothing else. If i go to the friend list from there i can't invite anybody..

    I was expecting something like a friend list to show who invite but instead i just have the standard global menu where i can't invite nobody.

    But as i said.. the sphere is white and i'm connected,no problem about that. I'm just not able to join and/or invite anybody.
  • Ross_BeefRoss_Beef Posts: 170 Oculus Staff
    Hi Welby,

    So hopefully when you hit X you are landing on Universal Menu with the app logo showing front and center. It may be that you’re hitting an intermittent bug where the friends list takes a while to show up - try waiting on this section of Universal Menu (even for 30s) in case the friends list does show. It’s something we’re working to fix.
  • WelbyWelby Posts: 1,063 Oculus Start Member
    edited October 2017
    Thanks a lot for the reply!

    Yes as you said the universal menu appears with the app logo in front and center but even after 5-10 secs nothing happen. I'll try to wait a lot longer and see if it will works.

    Thanks!

    Edit: Ok, I tried waiting on the Global menu for more than 2 minutes but still nothing. White Sphere,pressing X pop up the global menu but even waiting isn't useful since there's no friend list. I'll do more tries for longer period of time otherwise i'll just wait an official update on the avatar sdk i guess! 
  • Naveen98968Naveen98968 Posts: 4
    NerveGear
    Hi @welby,
    How do you manage to connect oculus room and your sphere color changed to white.

    I am having to creating room!,Its not connecting.

    I follow all steps regarding initialization and Room API.

    I have and Query too,Do we need to upload binary to test above things under development.?

    thanks in advance

  • SkyMageSkyMage Posts: 12
    NerveGear
    I haven't tested the invite feature yet, but it would require the following:
    * two Oculus accounts, running on real oculus equipment (unity editor without DK2 or CV1 will be kicked)
    * An APK with a properly formatted androidmanifest.xml uploaded to the alpha channel
    * both accounts invited to the alpha channel, having accepted the invite, and downloaded the app from the oculus store.
    The app on the store doesn't have to be functional. After it's been installed once, it can be uninstalled, and working test builds can be run on the phone.
    I suppose those two oculus accounts would also need to be eachother's friend.
    Accurate to the best of my knowledge, hope it helps :)

  • da9eda9e Posts: 8
    NerveGear
    Having same problem (X-button does not bring up any invite screen - just traditional oculus home with the developer icon of my app in the center). I saw in another post that you were suppose to have the app installed in Home. When I look in home I can see the app that I'm developing but it has a cross across the icon saying Not Valid and under it it says Not Installed. No apparent way of installing an app that is being run from the Unity editor - and doing a standalone build each time you change something in the code seems rather extensive during development?
  • da9eda9e Posts: 8
    NerveGear
    If you got stuck here is the code that I wrote to get around broken LaunchInvitableUserFlow() method. In Playercontroller.cs replace the checkInput() method with the following two methods:

    //Added to bypass broken Rooms.LaunchInvitableUserFlow(roomManager.roomID)
        void inviteAll(Oculus.Platform.Message<Oculus.Platform.Models.UserList> message) {
            if (message.IsError) {
                Debug.Log ("Houston we got a Problem!!");
            } else {
                List<User> userList = message.Data.Data;
                foreach (User u in userList) {
                    Debug.Log ("Sending invite to user: "+u.OculusID+" invite: "+u.InviteToken);
                    Rooms.InviteUser (roomManager.roomID, u.InviteToken);
                }
            }
        }

        // Check for input from the touch controllers
        void checkInput()
        {
            if (UnityEngine.Application.platform == RuntimePlatform.Android) 
            {
                // GearVR Controller

                // Bring up friend invite list
                if (OVRInput.GetDown(OVRInput.Button.Back)) 
                {
                    Rooms.LaunchInvitableUserFlow(roomManager.roomID);
                }
                
                // Toggle Camera
                if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad)) 
                {
                    ToggleCamera ();
                }

                // Toggle Help UI
                if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger)) 
                {
                    ToggleUI ();
                }
            }
            else 
            {
                // PC Touch 

                // Bring up friend invite list
                if (OVRInput.GetDown(OVRInput.Button.Three)) 
                {
                    //Rooms.LaunchInvitableUserFlow (roomManager.roomID);
                    RoomOptions roomOptions = new RoomOptions();
                    roomOptions.SetRoomId (roomManager.roomID);
                    Rooms.GetInvitableUsers2(roomOptions).OnComplete(inviteAll);
                }
                
                // Toggle Camera
                if (OVRInput.GetDown(OVRInput.Button.Four)) 
                {
                    ToggleCamera ();
                }

                // Toggle Help UI
                if (OVRInput.GetDown(OVRInput.Button.PrimaryThumbstick)) 
                {
                    ToggleUI ();
                }
            }
        }

  • GriNGriN Posts: 22
    Brain Burst
    edited December 2017
    I also can not invite any user.
    - using "oculus integration" asset from unity asset store with "unity 2017.2.0f3"
    - added oculus ID's to platform and avatar settings
    - I have blue floor, white sphere.
    - adjusted script according to comment above.

    Anyone got this running with any success?

    Will try again using separate packages in stead of assetstore pack.
  • GriNGriN Posts: 22
    Brain Burst
    Updated to Dash-beta and now it seems to work. Well, I think :) Guess I would need someone else with the app installed too to actually invite them :pensive:
    At least I'm getting a "no players available" warning.
  • da9eda9e Posts: 8
    NerveGear
    Hi GriN, I made two oculus accounts and added them as developers to the oculus app. Then with the code above the eligible users are invited (since in my case only two accounts have access - the account not being the server recieves an invite in oculus home).
  • Preston_JPreston_J Posts: 23 Oculus Start Member
    edited July 2018
    I've made some progress on this.  I'm getting the white sphere both in my Oculus Go and Oculus Rift.  From the Rift I can bring up the friends list and I can see my test user on the Go.  I send the invite but the Go user does not receive any message.  From the Go its a bit different.  On the Go I pull up the friends list, but it is empty.  There is a message telling me to invite friends from the Oculus App.  I've tried waiting a good bit, but nothing ever gets populated on the friends list for the Go.  I may have to step back and make my second VR game just another single person game.  But I would like to get this working.   I do have both test user A and B as subscribed users for both the Go and Rift builds on the alpha channel.  But only Test user A is a developer.  Test user B is not listed as a developer.  Any tips, or help on this would be greatly appreciated on getting friends list to populate on the Go.  Edit:   I'm in Unity 2018.2 and using the light weight render pipeline.   I've had to use shader graph to make new shaders for the materials on the local and remote avatars.   I hope this is not the root problem.    

  • Preston_JPreston_J Posts: 23 Oculus Start Member
    Update - Its all working for me now.  I did not realize I had to create an App Grouping. Once I created the App Groupings and added my Rift and  Gear VR builds to the group everything worked as expected.  There were no delays on the list of potential friend invites. 
  • Ross_BeefRoss_Beef Posts: 170 Oculus Staff
    That’s awesome news @PJ373

    @SkyMage, @da9e, @GriN and @Welby - were you all able to make progress or is there any way we can help?
  • WelbyWelby Posts: 1,063 Oculus Start Member
    I stopped there to move on on my current main project but as soon as i'll be back doing experiments with the Avatar SDK again I'll make sure to give you an update on this thread :) 
Sign In or Register to comment.