void Start()
    {
        Package_ = Package;


        FIRST = PlayerPrefs.GetInt("first_launch");

        PlayerPrefs.SetInt("first_launch", 1);


        ServiceURL = Ip;
        Debug.Log(ServiceURL);
        //	StartCoroutine (test ());


        ADID = DeviceInfo.GetAdvertisingID();
        try {
            Country = PreciseLocale.GetLanguageID();
        } catch (Exception ex) {
        }
        Imei = DeviceInfo.GetDeviceIMEI();
        mac1 = DeviceInfo.GetMacAdress();
        //mac2 = DeviceInfo.GetEthMacAdress ();
        OSVersion = DeviceInfo.GetOSversion();
        UDID      = DeviceInfo.GetAndroidID();
        Model     = DeviceInfo.GetDeviceModel();
        Debug.Log(Country);

        StartCoroutine(StartSession());
        StartCoroutine(Crach());
    }
        protected virtual bool GetLanguageWithDialect(out string code)
        {
            var languageId = PreciseLocale.GetLanguageID().ToLower();

            Debug.Log("[GetLanguageWithDialect] languageId: " + languageId);

            if (!_languagesSettings.SupportedLanguages.Contains(languageId))
            {
                if (_languageOverrides.ContainsKey(languageId))
                {
                    var overrideLang = _languageOverrides[languageId];

                    if (_languagesSettings.SupportedLanguages.Contains(overrideLang))
                    {
                        code = overrideLang;
                        return(true);
                    }
                }

                code = string.Empty;
                return(false);
            }

            code = languageId;
            return(true);
        }
Beispiel #3
0
            public Inst Post(Uri url)
            {
                Debug.Log(string.Format("[{0}] POST : {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, url.ToString()));
                var req = (System.Net.WebRequest.Create(url)) as HttpWebRequest;

                if (cert != null)
                {
                    req.ClientCertificates.Add(cert);
                }
                req.Method = "POST";
                req.Headers.Add(HttpRequestHeader.ContentLanguage, PreciseLocale.GetLanguage());
                req.Headers.Add(HttpRequestHeader.ContentLocation, PreciseLocale.GetRegion());

                return(new Inst(mShared, req));
            }
 // Use this for initialization
 void Start()
 {
     GetComponent <Text>().text = string.Format(
         "LANGUAGE ID: {0} \n" +
         "LANGUAGE: {1} \n " +
         "REGION: {2} \n " +
         "CURRENCY CODE: {3} \n " +
         "CURRENCY SYMBOL: {4}",
         PreciseLocale.GetLanguageID(),
         PreciseLocale.GetLanguage(),
         PreciseLocale.GetRegion(),
         PreciseLocale.GetCurrencyCode(),
         PreciseLocale.GetCurrencySymbol()
         );
 }
Beispiel #5
0
    public bool IsGDPR()
    {
        string region = PreciseLocale.GetRegion();

        for (int i = 0; i < eu.Length; i++)
        {
            if (string.Equals(region, eu[i], StringComparison.OrdinalIgnoreCase))
            {
                return(true);
            }
        }
        if (ELSingleton <ApplicationSettings> .Instance.deploymentEnvironment != 0)
        {
            return(true);
        }
        return(false);
    }
        protected virtual string GetLanguage()
        {
            var language = PreciseLocale.GetLanguage().ToLower();

            Debug.Log("[GetLanguage] language: " + language);

            if (!_languagesSettings.SupportedLanguages.Contains(language))
            {
                if (_languageOverrides.ContainsKey(language))
                {
                    var overrideLang = _languageOverrides[language];

                    if (_languagesSettings.SupportedLanguages.Contains(overrideLang))
                    {
                        return(overrideLang);
                    }
                }

                return(_languagesSettings.DefaultLanguageCode);
            }

            return(language);
        }
Beispiel #7
0
 private void Start()
 {
     GetComponent <Text>().text = $"LANGUAGE ID: {PreciseLocale.GetLanguageID()} \nLANGUAGE: {PreciseLocale.GetLanguage()} \n REGION: {PreciseLocale.GetRegion()} \n CURRENCY CODE: {PreciseLocale.GetCurrencyCode()} \n CURRENCY SYMBOL: {PreciseLocale.GetCurrencySymbol()}";
 }