private void QuerryHeadsetReceived(object sender, List <Headset> headsets)
        {
            Console.WriteLine("QuerryHeadsetReceived");

            // Create a Session when have new update of headset connection
            if (string.IsNullOrEmpty(GetAccessToken()))
            {
                return;
            }
            if (!SessionCtr.IsCreateSession)
            {
                SessionCtr.CreateSession(GetSelectedHeadsetId(), GetAccessToken(), ExperimentID);
            }
        }
Exemple #2
0
        // Set status for session
        //public void SetNextStatus(string status)
        //{
        //    SessionCtr.NextStatus = status;
        //}

        // Create Session
        public void CreateSession()
        {
            if (string.IsNullOrEmpty(LicenseId))
            {
                SessionCtr.NextStatus = "open";
            }
            else
            {
                SessionCtr.NextStatus = "active";
            }
            if (IsHeadsetConnected() && !string.IsNullOrEmpty(GetAccessToken()))
            {
                SessionCtr.CreateSession(GetSelectedHeadsetId(), GetAccessToken(), ExperimentID);
            }
        }