Whenever i execute AdProvider.Instance.InterstitialAdShow(); , blank white page shown instead of interstetial ad, thats my script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Tizen.AdLib;
using System;
using UnityEngine.UI;
publicclassAdListener1:BannerAdListener
{
privateAdProvideradobj;
publicAdListener1(AdProvideradobject)
{
adobj=adobject;
}
publicvoidOnAdClicked(IntPtrhandle)
{
}
publicvoidOnAdLoadFailed(IntPtrhandle,ErrorTypeerror)
{
}
publicvoidOnAdLoadSucceeded(IntPtrhandle)
{
//adobj.BannerAdSetVisibility(handle,true);
}
}
publicclassAdListener:InterstitialAdListener
{
publicvoidOnAdClosed(IntPtrhandle)
{
AdProvider.Instance.InterstitialAdLoad();
}
publicvoidOnAdLoadFailed(IntPtrhandle,ErrorTypeerror)
{
AdProvider.Instance.InterstitialAdLoad();
}
publicvoidOnAdLoadSucceeded(IntPtrhandle)
{
Debug.Log("EnteredtoOnAdLoadSucceeded");
AdController.isInterstetialLoaded=true;
//AdProvider.Instance.InterstitialAdShow();
}
publicvoidOnAdOpened(IntPtrhandle)
{
}
}
publicclassAdController:MonoBehaviour{
publicstaticboolisInterstetialLoaded;
AdProvideradobject=AdProvider.Instance;
voidAwake()
{
DontDestroyOnLoad(this);
if(FindObjectsOfType(GetType()).Length>1)
{
Destroy(gameObject);
}
}
voidStart(){
isInterstetialLoaded=false;
IntPtrhandle,handle2;
adobject.InitAdlib("2cabe3d102f112345a93f608a082c0c3","_inmobi","https://i.l.inmobicdn.net/sdk/jsac/p1/inmobi.js","inmobi_conf");
Debug.Log("Enteredintostart");
AdListener1adListener_b=newAdListener1(adobject);
AdListeneradListener_i=newAdListener();
adobject.AddInterstitialAd();
adobject.InterstitialAdLoad();
adobject.SetInterstitialAdListener(adListener_i);
ErrorTyperesult=adobject.AddBannerAd(BannerAdSize.BANNER_AD_SIZE_BIG,outhandle);
Debug.Log("Handlevalue:"+handle);
adobject.BannerAdLoad(handle);
result=adobject.AddBannerAd(BannerAdSize.BANNER_AD_SIZE_SMALL,outhandle2);
Debug.Log("Handlevalue:"+handle2);
adobject.BannerAdLoad(handle2);
adobject.BannerAdSetPosition(handle2,BannerAdPosition.BANNER_AD_POS_TOP_CENTER);
adobject.SetBannerAdListener(handle,adListener_b);
adobject.SetBannerAdListener(handle2,adListener_b);
}///
publicvoidShowAdClick()
{
if(isInterstetialLoaded==true){
isInterstetialLoaded=false;
AdProvider.Instance.InterstitialAdShow();
}
}
publicvoidQuit()
{
adobject.DeinitAdlib();
Application.Quit();
}
}