public void Start(Net.IRequestListener startListener) { string now = System.DateTime.Now.ToString().Replace('/', '_').Replace(':', '_'); tracesFile = tracesPathPrefix + ".csv"; Write("\n" + Separator + now + "\n", startListener); }
public void Start(Net.IRequestListener startListener) { Dictionary <string, string> headers = new Dictionary <string, string> (); headers.Add("Authorization", authorization); net.POST(host + start + trackingCode, null, headers, netStartListener); }
private void Write(String data, Net.IRequestListener requestListener) { try { File.AppendAllText(tracesFile, data); requestListener.Result(""); } catch (Exception e) { requestListener.Error(e.Message); } }
private void Write(String data, Net.IRequestListener requestListener) { #if UNITY_WEBGL requestListener.Error("Impossible to use LocalStorage in WebGL version"); #elif UNITY_ANDROID || UNITY_IPHONE || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX try { File.AppendAllText(tracesFile, data); requestListener.Result(""); } catch (Exception e) { requestListener.Error(e.Message); } #endif }
public void Send(String data, Net.IRequestListener flushListener) { string tmpData = data.Replace("{\"actor", "${\"actor").Replace("[", "").Replace("]", ""); string[] tmpArray = tmpData.Split('$'); foreach (string action in tmpArray) { if (action != "") { Log.L().AddLogLine("net: " + action); } } net.POST(host + track, System.Text.Encoding.UTF8.GetBytes(data), trackHeaders, flushListener); }
private void Write(String data, Net.IRequestListener requestListener) { #if UNITY_WEBGL requestListener.Error("Impossible to use LocalStorage in WebGL version"); #elif UNITY_ANDROID || UNITY_IPHONE || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX try { string tmpData = data.Replace("{\"actor", "${\"actor").Replace("[", "").Replace("]", ""); string[] tmpArray = tmpData.Split('$'); foreach (string action in tmpArray) { if (action != "") { Log.L().AddLogLine("local: " + action); } } File.AppendAllText(tracesFile, data); requestListener.Result(""); } catch (Exception e) { requestListener.Error(e.Message); } #endif }
public void Send(String data, Net.IRequestListener flushListener) { Write(data, flushListener); }
public void Send(String data, Net.IRequestListener flushListener) { net.POST(host + track, System.Text.Encoding.UTF8.GetBytes(data), trackHeaders, flushListener); }