public static void AddDeviceIDToMemory(List <byte> dynMem, DeviceID deviceID) { for (int i = 0; i < deviceID.GetDeviceIDSize(); i++) { dynMem.Add(deviceID.GetIDArray() [i]); } }
public static void PrintDeviceID(DeviceID deviceID) { Console.Write("FOUND ID: "); for (int i = 0; i < deviceID.GetDeviceIDSize(); i++) { Console.Write(deviceID.GetIDArray() [i] + " "); } Console.WriteLine(); }
public static void SendAnalytics(DeviceID deviceID, List <byte> memoryDump) { List <byte> deviceIDList = deviceID.GetIDArray(); string base64deviceID = Convert.ToBase64String(deviceIDList.ToArray()); Debug.Log("Saving Analytics for " + base64deviceID); string url = "https://heep-3cddb.firebaseio.com/analytics/" + base64deviceID + ".json"; string base64 = Convert.ToBase64String(memoryDump.ToArray()); string data = "\"" + base64 + "\""; POST(url, data); }
public static string GetDeviceIDString(DeviceID deviceID) { List <byte> deviceIDList = deviceID.GetIDArray(); StringBuilder hex = new StringBuilder(deviceIDList.Count * 2); foreach (byte b in deviceIDList) { hex.AppendFormat("{0:x2}", b); } string deviceIDString = hex.ToString(); return(deviceIDString); }