Exemple #1
0
        public void showOfferWall()
        {
            waitingForPlaySuccessConfirmation = false;
            webviewMode = WebviewMode.offerWall;



            if (webView != null)
            {
                if (AdGem.verboseLogging)
                {
                    Debug.Log("Adgem - Offerwall url : " + AdGemPlugin.getOfferWallUrl(true));
                }

                offerWallLoading = true;

                webView.Load(AdGemPlugin.getOfferWallUrl(true));

                StartCoroutine(waitForPageToLoadThenShowWebview());
            }
            else
            {
                Debug.Log("Adgem--- Error! Webview not initialized.");
            }
        }
    public void showOfferWall()
    {
        bool showOfferWallInBrowser = true;

        //Debug.Log(">>>>>>>>>>>> os version: " + GetMajorOsVersion(AdGemPlugin.getOsVersion()));

        int osMajorVersion = AdGem.GetMajorOsVersion(AdGemPlugin.getOsVersion());

#if UNITY_ANDROID
        if (osMajorVersion >= 5)
        {
            showOfferWallInBrowser = false;
        }
#endif
#if UNITY_IOS
        if (osMajorVersion >= 9)
        {
            showOfferWallInBrowser = false;
        }
#endif

        if (AdGemPlugin.openOfferWallInBrowser)
        {
            showOfferWallInBrowser = true;
        }

        if (showOfferWallInBrowser)
        {
            if (AdGem.verboseLogging)
            {
                Debug.Log("Adgem - showing offer wall in browser");
            }

            Application.OpenURL(AdGemPlugin.getOfferWallUrl(false));
            AdGemManager.staticRef.startPollingProcess();
            if (AdGem.offerWallClosed != null)
            {
                StartCoroutine(waitThenCallOfferWallClosed());
            }
        }
        else
        {
            if (goWebview != null)
            {
                adGemWebview.showOfferWall();
            }
            else
            {
                Debug.Log("Adgem --- Error! Offer wall not initialized.");
            }
        }
    }