Exemple #1
0
 void Request_OnRequestFinished(SA.Fitness.SensorRequestResult result)
 {
     Debug.Log("Request_OnRequestFinished " + result.Id);
     if (result.IsSucceeded)
     {
         dataSources = result.DataSources;
     }
 }
Exemple #2
0
        public void DispatchResult(string[] bundle)
        {
            int    statusCode          = Int32.Parse(bundle [1]);
            string message             = bundle [2];
            SensorRequestResult result = statusCode == 0 ? new SensorRequestResult(id) : new SensorRequestResult(id, statusCode, message);

            for (int i = 3; i < bundle.Length; i++)
            {
                string[]   dataSource = bundle [i].Split(new string[] { Connection.SEPARATOR1 }, StringSplitOptions.None);
                DataSource source     = new DataSource(dataSource);
                result.AddDataSource(source);
            }

            OnRequestFinished(result);
        }