InterstitialAd interstitial;
string AndroidId = "ca-app-pub-3940256099942544/8691691433";
string IphoneId;
void RequestInterstitial(){
string adUnitId = string.Empty;
#if UNITY_ANDROID || UNITY_EDITOR
adUnitId = AndroidId;
#elif UNITY_IPHONE || UNITY_EDITOR
adUnitId = IphoneId;
#endif
// Initialize an InterstitialAd.
interstitial = new InterstitialAd(adUnitId);
// Called when an ad request has successfully loaded.
interstitial.OnAdLoaded += OnAdLoaded;
// Called when an ad request failed to load.
interstitial.OnAdFailedToLoad += OnAdFailedToLoad;
// Called when an ad is shown.
interstitial.OnAdOpening += OnAdOpening;
// Called when the ad is closed.
interstitial.OnAdClosed += OnAdClosed;
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
interstitial.LoadAd(request);
}
// somewhere in the code after loading the ad
interstitial.Show();
But as you can see in the photo below that the image is not showing properly
i think it is a problem with device orientation settings. go to player settings> android settings> resolution and presentation> orientation settings. check other settings in that too to make sure everything is fine.