private IEnumerator POSTInstall(string host, WWWForm data)
    {
        UnityWebRequest www = UnityWebRequest.Post(host, data);

        yield return(www.Send());

        if (!www.isNetworkError && www.responseCode == 200L)
        {
            string text = www.downloadHandler.text;
            AppInstallReportService.InstallRespone installRespone = JsonUtility.FromJson <AppInstallReportService.InstallRespone>(text);
            if (installRespone != null && installRespone.success == 1)
            {
                AppInstallReportService.InstallGUIDSent = true;
                if (AppInstallReportService.GDPRStatusReceived != null)
                {
                    AppInstallReportService.GDPRStatusReceived(installRespone.gdpr == 1);
                }
                FMLogger.vCore("app install sent. status: " + (installRespone.gdpr == 1));
            }
        }
        if (!AppInstallReportService.InstallGUIDSent)
        {
            this.RescheduleInstallReport();
        }
        yield break;
    }
예제 #2
0
 private void Start()
 {
     if (string.IsNullOrEmpty(AppInstallReportService.InstallGUID))
     {
         AppInstallReportService.GenerateInstallGUID();
     }
     this.adsConsent           = new MoPubConsent();
     this.adsConsent.OnResult += this.OnMopubResult;
     this.adsConsent.Check();
     base.StartCoroutine(this.TGFConsentTimeout((float)this.tgfResultTimeoutTime));
     this.tgfConsent           = new TGFConsent();
     this.tgfConsent.OnResult += this.OnTGFResult;
     this.tgfConsent.Check();
     this.initTime = DateTime.UtcNow;
 }