public void Init(bool isOldUser, bool gdprSupported) { var settings = Resources.Load <ElephantSettings>("ElephantSettings"); if (settings == null) { Debug.LogError( "[Elephant SDK] Elephant SDK settings isn't setup, use Window -> Elephant -> Edit Settings to enter your Game ID and Game Secret"); } else { this.GameID = settings.GameID; this.GameSecret = settings.GameSecret; } if (GameID.Equals(defaultGameID) || GameSecret.Equals(defaultGameSecret) || GameID.Trim().Length == 0 || GameSecret.Trim().Length == 0) { Debug.LogError( "[Elephant SDK] Game ID and Game Secret are not present, make sure you replace them with yours using Window -> Elephant -> Edit Settings"); } VersionCheckUtils.GetInstance(); this.gdprSupported = gdprSupported; StartCoroutine(InitSDK(isOldUser)); }
public void FillBaseData(long sessionID) { this.bundle = Application.identifier; this.idfa = ElephantCore.Instance.idfa; this.idfv = ElephantCore.Instance.idfv; this.app_version = Application.version; this.lang = Utils.GetISOCODE(Application.systemLanguage); this.user_tag = RemoteConfig.GetInstance().GetTag(); this.os_version = SystemInfo.operatingSystem; this.sdk_version = ElephantVersion.SDK_VERSION; this.ad_sdk_version = VersionCheckUtils.GetInstance().AdSdkVersion; this.device_model = SystemInfo.deviceModel; this.create_date = Utils.Timestamp(); this.session_id = sessionID; try { TimeZone localZone = TimeZone.CurrentTimeZone; DateTime currentDate = DateTime.Now; TimeSpan currentOffset = localZone.GetUtcOffset(currentDate); this.timezone_offset = currentOffset.ToString(); } catch (Exception e) { Debug.Log(e); } }
public static VersionCheckUtils GetInstance() { return(_instance ?? (_instance = new VersionCheckUtils { AdSdkVersion = GetAdSdkVersion(), MopubVersion = GetMopubVersion(), UnityVersion = GetUnityVersion(), NetworkVersions = GetMopubNetworkVersions() })); }
private void SendVersionsEvent() { var versionCheckUtils = VersionCheckUtils.GetInstance(); var versionData = new VersionData(Application.version, ElephantVersion.SDK_VERSION, SystemInfo.operatingSystem, versionCheckUtils.AdSdkVersion, versionCheckUtils.MopubVersion, versionCheckUtils.UnityVersion, versionCheckUtils.NetworkVersions); var parameters = Params.New() .CustomString(JsonUtility.ToJson(versionData)); Elephant.Event("elephant_sdk_versions_info", -1, parameters); }
public static VersionCheckUtils GetInstance() { return(_instance ?? (_instance = new VersionCheckUtils { AdSdkVersion = GetAdSdkVersion() })); }