private void TextInfo() { textInfo.text = "INFORMATIONS"; // time textInfo.text += "\nDate Time: " + System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss"); // user textInfo.text += "\nUser name: " + SGFirebase.userName; textInfo.text += "\nUser email: " + SGFirebase.userEmail; textInfo.text += "\nUser id: " + SGFirebase.userId; // screen textInfo.text += "\nScreen dpi: " + Screen.dpi; textInfo.text += "\nScreen orientation: " + Screen.orientation; textInfo.text += "\nScreen dimension pixels: " + Screen.width + "x" + Screen.height; // some player prefs foreach (string key in SGStorage.GetGenericPrefs()) { textInfo.text += "\nGenericPrefs : " + key + "=" + SGStorage.GetGenericPref(key); } // environment textInfo.text += "\nProduct: " + SGEnvironment.GetProdutcName() + " " + SGEnvironment.GetVersion(); textInfo.text += "\nProduct company name: " + Application.companyName; textInfo.text += "\nProduct absolute url: " + Application.absoluteURL; textInfo.text += "\nProduct build GUID: " + Application.buildGUID; textInfo.text += "\nProduct identifier: " + Application.identifier; textInfo.text += "\nProduct installer name: " + Application.installerName; textInfo.text += "\nProduct internet reachability: " + Application.internetReachability; textInfo.text += "\nProduct data path: " + Application.dataPath; textInfo.text += "\nProduct persistent data path: " + Application.persistentDataPath; textInfo.text += "\nProduct streaming assets path: " + Application.streamingAssetsPath; textInfo.text += "\nProduct temporary cache path: " + Application.temporaryCachePath; textInfo.text += "\nUnity: " + SGEnvironment.GetUnityVersion(); textInfo.text += "\nDevice platform: " + Application.platform; textInfo.text += "\nDevice unique identifier: " + SystemInfo.deviceUniqueIdentifier; textInfo.text += "\nDevice name: " + SystemInfo.deviceName; textInfo.text += "\nDevice model: " + SystemInfo.deviceModel; textInfo.text += "\nDevice SO: " + SystemInfo.operatingSystem; textInfo.text += "\nDevice system language: " + Application.systemLanguage; textInfo.text += "\nDevice type: " + SystemInfo.deviceType; textInfo.text += "\nDevice memory size: " + SystemInfo.systemMemorySize.ToString(); textInfo.text += "\nDevice processors: " + SystemInfo.processorCount.ToString(); textInfo.text += "\nFirebase Ready: " + SGFirebase.SetupReady.ToString(); }
/// <summary> /// Verificar via remote settings a necessita de atualização do App, verificando a versão /// https://console.firebase.google.com/project/learn-english-gamification/config /// </summary> private void CheckUpgrade() { string upgrade = SGFirebase.RemoteSettings(remoteSettingsAppUpgrade, SGEnvironment.GetVersion()); upgrade = upgrade.Trim(); // check if (string.IsNullOrEmpty(upgrade)) { return; } // check if (upgrade == SGEnvironment.GetVersion()) { return; } // split parts string[] newVersion = upgrade.Split('.'); string[] version = SGEnvironment.GetVersion().Split('.'); // check if (newVersion.Length < 2 || version.Length < 2) { return; } // upgrade immediately or later if (newVersion[0] != version[0]) { Debug.LogWarning("Upgrade Immediately: Old " + version[1] + " - New " + newVersion[1]); msgUpgradeNow.SetActive(true); } else if (newVersion[1] != version[1]) { Debug.LogWarning("Upgrade: Old " + version[1] + " - New " + newVersion[1]); msgUpgrade.SetActive(true); } }