So I've faced with a problem when trying to show interstitial ads on my device.
Requesting interstitial ads always return a success message, but when I try to call show function, nothing happens.
It only happens with interstitial ads, because banner ads are working and showing on device.
Also, AdColony dashboard receives new requests, but still showing functions doesn't work:
I've tried using both live and test ads.
I'm using:
Unity 2020.1.4f1
External Dependency Manager 1.2.156
AdColony 4.3.1
This is part of the code I'm trying to run:
AdColony.InterstitialAd _ad = null;
// Start is called before the first frame update
void Start()
{
string[] zoneIds = new string[] { "myZoneID" };
AdColony.Ads.Configure("myAppID", null, zoneIds);
AdColony.Ads.OnRequestInterstitial += (AdColony.InterstitialAd ad) => {
_ad = ad;
};
AdColony.Ads.OnExpiring += (AdColony.InterstitialAd ad) => {
AdColony.Ads.RequestInterstitialAd("myZoneID", null);
};
}
public void Request()
{
AdColony.Ads.RequestInterstitialAd("myZoneID", null);
}
public void Show()
{
if (_ad != null) {
AdColony.Ads.ShowAd(_ad);
}
else
{
Debug.Log("null");
}
}
Is there any way to fix this problem?
Finally I've got it working!
So there were three problems that I needed to solve in order to show the ads.
And now interstitial ads are working perfectly!