Exemple #1
0
 public static void AddDeviceIDToMemory(List <byte> dynMem, DeviceID deviceID)
 {
     for (int i = 0; i < deviceID.GetDeviceIDSize(); i++)
     {
         dynMem.Add(deviceID.GetIDArray() [i]);
     }
 }
Exemple #2
0
 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();
 }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }