diff --git a/source/plugin/Assets/GoogleMobileAds/Api/AdManagerBannerView.cs b/source/plugin/Assets/GoogleMobileAds/Api/AdManagerBannerView.cs index ad8ad2ee1..77c3a83ce 100644 --- a/source/plugin/Assets/GoogleMobileAds/Api/AdManagerBannerView.cs +++ b/source/plugin/Assets/GoogleMobileAds/Api/AdManagerBannerView.cs @@ -23,13 +23,55 @@ namespace GoogleMobileAds.Api.AdManager /// Banner view that works with Google Ad Manager. Banner views occupy a spot within an app's /// layout. They stay on screen while users are interacting with the app. /// - public class AdManagerBannerView : BannerView + public class AdManagerBannerView { + /// + /// Raised when an ad is loaded into the banner view. + /// + public event Action OnBannerAdLoaded; + + /// + /// Raised when an ad fails to load into the banner view. + /// + public event Action OnBannerAdLoadFailed; + + /// + /// Raised when the ad is estimated to have earned money. + /// + public event Action OnAdPaid; + + /// + /// Raised when an ad is clicked. + /// + public event Action OnAdClicked; + + /// + /// Raised when an impression is recorded for an ad. + /// + public event Action OnAdImpressionRecorded; + + /// + /// Raised when an ad opened full-screen content. + /// + public event Action OnAdFullScreenContentOpened; + + /// + /// Raised when the ad closed full-screen content. + /// On iOS, this event is only raised when an ad opens an overlay, not when opening a new + /// application such as Safari or the App Store. + /// + public event Action OnAdFullScreenContentClosed; + /// /// Raised when the app receives an event from the banner ad. /// public event Action OnAppEventReceived; + /// + /// Returns true if Destroy() has been called. + /// + public bool IsDestroyed { get { return _client == null; } } + /// /// Sets the supported sizes of the banner ad. In most cases, only one ad size will be /// specified. Use one of the predefined standard ad sizes (such as AdSize.MediumRectangle), @@ -50,10 +92,12 @@ public class AdManagerBannerView : BannerView /// public List ValidAdSizes { - get { return ((IAdManagerBannerClient)_client).ValidAdSizes; } - set { ((IAdManagerBannerClient)_client).ValidAdSizes = value; } + get { return _client.ValidAdSizes; } + set { _client.ValidAdSizes = value; } } + internal IAdManagerBannerClient _client; + /// /// Creates an Ad Manager banner view with a standard position. /// @@ -74,11 +118,195 @@ public AdManagerBannerView(string adUnitId, AdSize adSize, int x, int y) ConfigureBannerEvents(); } - protected internal override void ConfigureBannerEvents() + /// + /// Destroys the banner view. + /// + public void Destroy() + { + if (_client != null) + { + _client.DestroyBannerView(); + _client = null; + } + } + + /// + /// Returns the ad unit ID. + /// + public string GetAdUnitID() + { + return _client != null ? _client.GetAdUnitID() : null; + } + + /// + /// Returns the ad request response info or null if the ad is not loaded. + /// + public ResponseInfo GetResponseInfo() + { + return _client != null ? new ResponseInfo(_client.GetResponseInfoClient()) : null; + } + + /// + /// Returns the height of the banner view in pixels. + /// + public float GetHeightInPixels() + { + return _client != null ? _client.GetHeightInPixels() : 0; + } + + /// + /// Returns the width of the banner view in pixels. + /// + public float GetWidthInPixels() + { + return _client != null ? _client.GetWidthInPixels() : 0; + } + + /// + /// Loads an ad into the banner view. + /// + public void LoadAd(AdRequest request) + { + if (_client != null) + { + _client.LoadAd(request); + } + } + + /// + /// Shows the banner view. + /// + public void Show() + { + if (_client != null) + { + _client.ShowBannerView(); + } + } + + /// + /// Hides the banner view. + /// + public void Hide() + { + if (_client != null) + { + _client.HideBannerView(); + } + } + + /// + /// Sets the position of the banner view using standard position. + /// + public void SetPosition(AdPosition adPosition) { - base.ConfigureBannerEvents(); + if (_client != null) + { + _client.SetPosition(adPosition); + } + } + + /// + /// Sets the position of the banner view using custom position. + /// + public void SetPosition(int x, int y) + { + if (_client != null) + { + _client.SetPosition(x, y); + } + } + + /// + /// Indicates whether the last loaded ad is a collapsible banner. + /// + public bool IsCollapsible() + { + return _client == null ? false : _client.IsCollapsible(); + } + + private void ConfigureBannerEvents() + { + + _client.OnAdLoaded += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnBannerAdLoaded != null) + { + OnBannerAdLoaded(); + } + }); + }; + + _client.OnAdFailedToLoad += (sender, args) => + { + LoadAdError loadAdError = new LoadAdError(args.LoadAdErrorClient); + MobileAds.RaiseAction(() => + { + if (OnBannerAdLoadFailed != null) + { + OnBannerAdLoadFailed(loadAdError); + } + }); + }; + + _client.OnAdOpening += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnAdFullScreenContentOpened != null) + { + OnAdFullScreenContentOpened(); + } + }); + }; + + _client.OnAdClosed += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnAdFullScreenContentClosed != null) + { + OnAdFullScreenContentClosed(); + } + }); + }; + + _client.OnPaidEvent += (adValue) => + { + MobileAds.RaiseAction(() => + { + if (OnAdPaid != null) + { + OnAdPaid(adValue); + } + }); + }; + + _client.OnAdClicked += () => + { + MobileAds.RaiseAction(() => + { + if (OnAdClicked != null) + { + OnAdClicked(); + } + }); + }; + + _client.OnAdImpressionRecorded += () => + { + MobileAds.RaiseAction(() => + { + if (OnAdImpressionRecorded != null) + { + OnAdImpressionRecorded(); + } + }); + }; - ((IAdManagerBannerClient)_client).OnAppEvent += (appEvent) => + _client.OnAppEvent += (appEvent) => { MobileAds.RaiseAction(() => { diff --git a/source/plugin/Assets/GoogleMobileAds/Api/AdManagerInterstitialAd.cs b/source/plugin/Assets/GoogleMobileAds/Api/AdManagerInterstitialAd.cs index a8a717ba6..127b24393 100644 --- a/source/plugin/Assets/GoogleMobileAds/Api/AdManagerInterstitialAd.cs +++ b/source/plugin/Assets/GoogleMobileAds/Api/AdManagerInterstitialAd.cs @@ -25,13 +25,48 @@ namespace GoogleMobileAds.Api.AdManager /// such as a page change or an app launch for Google Ad Manager publishers. /// Interstitials use a close button that removes the ad from the user's experience. /// - public class AdManagerInterstitialAd : InterstitialAd + public class AdManagerInterstitialAd { + /// + /// Raised when the ad is estimated to have earned money. + /// + public event Action OnAdPaid; + + /// + /// Raised when an ad is clicked. + /// + public event Action OnAdClicked; + + /// + /// Raised when an impression is recorded for an ad. + /// + public event Action OnAdImpressionRecorded; + + /// + /// Raised when an ad opened full-screen content. + /// + public event Action OnAdFullScreenContentOpened; + + /// + /// Raised when the ad closed full-screen content. + /// On iOS, this event is only raised when an ad opens an overlay, not when opening a new + /// application such as Safari or the App Store. + /// + public event Action OnAdFullScreenContentClosed; + + /// + /// Raised when the ad failed to open full-screen content. + /// + public event Action OnAdFullScreenContentFailed; + /// /// Raised when the app receives an event from the interstitial ad. /// public event Action OnAppEventReceived; + internal IAdManagerInterstitialClient _client; + internal bool _canShowAd; + private AdManagerInterstitialAd(IAdManagerInterstitialClient client) { _client = client; @@ -43,7 +78,7 @@ private AdManagerInterstitialAd(IAdManagerInterstitialClient client) /// Verify if an ad is preloaded and available to show. /// /// The ad Unit Id of the ad to verify. - public static new bool IsAdAvailable(string adUnitId) + public static bool IsAdAvailable(string adUnitId) { if (string.IsNullOrEmpty(adUnitId)) { @@ -58,7 +93,7 @@ private AdManagerInterstitialAd(IAdManagerInterstitialClient client) /// Returns the next pre-loaded interstitial ad and null if no ad is available. /// /// The ad Unit ID of the ad to poll. - public static new InterstitialAd PollAd(string adUnitId) + public static AdManagerInterstitialAd PollAd(string adUnitId) { if (string.IsNullOrEmpty(adUnitId)) { @@ -71,7 +106,7 @@ private AdManagerInterstitialAd(IAdManagerInterstitialClient client) return null; } client.CreateInterstitialAd(); - return new AdManagerInterstitialAd(client.PollAdManagerAd(adUnitId)); + return new AdManagerInterstitialAd(client.PollAd(adUnitId)); } /// @@ -106,11 +141,125 @@ public static void Load(string adUnitId, AdRequest request, client.LoadAd(adUnitId, request); } - protected internal override void RegisterAdEvents() + /// + /// Returns true if the ad is loaded and not shown. + /// + public bool CanShowAd() + { + return _client != null && _canShowAd; + } + + /// + /// Shows the ad. + /// + public void Show() + { + if (CanShowAd()) + { + _canShowAd = false; + _client.Show(); + } + } + + /// + /// Destroys the ad. + /// + public void Destroy() + { + if (_client != null) + { + _canShowAd = false; + _client.DestroyInterstitial(); + _client = null; + } + } + + /// + /// Returns the ad unit ID. + /// + public string GetAdUnitID() + { + return _client != null ? _client.GetAdUnitID() : null; + } + + /// + /// Returns the ad request response info. + /// + public ResponseInfo GetResponseInfo() + { + return _client != null ? new ResponseInfo(_client.GetResponseInfoClient()) : null; + } + + private void RegisterAdEvents() { - base.RegisterAdEvents(); + _client.OnAdClicked += () => + { + MobileAds.RaiseAction(() => + { + if (OnAdClicked != null) + { + OnAdClicked(); + } + }); + }; + + _client.OnAdDidDismissFullScreenContent += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnAdFullScreenContentClosed != null) + { + OnAdFullScreenContentClosed(); + } + }); + }; + + _client.OnAdDidPresentFullScreenContent += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnAdFullScreenContentOpened != null) + { + OnAdFullScreenContentOpened(); + } + }); + }; + + _client.OnAdDidRecordImpression += (sender, args) => + { + MobileAds.RaiseAction(() => + { + if (OnAdImpressionRecorded != null) + { + OnAdImpressionRecorded(); + } + }); + }; + + _client.OnAdFailedToPresentFullScreenContent += (sender, error) => + { + var adError = new AdError(error.AdErrorClient); + MobileAds.RaiseAction(() => + { + if (OnAdFullScreenContentFailed != null) + { + OnAdFullScreenContentFailed(adError); + } + }); + }; + + _client.OnPaidEvent += (adValue) => + { + MobileAds.RaiseAction(() => + { + if (OnAdPaid != null) + { + OnAdPaid(adValue); + } + }); + }; - ((IAdManagerInterstitialClient)_client).OnAppEvent += (appEvent) => + _client.OnAppEvent += (appEvent) => { MobileAds.RaiseAction(() => { diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerBannerClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerBannerClient.cs index 8496b5091..34effdab8 100644 --- a/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerBannerClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerBannerClient.cs @@ -20,7 +20,7 @@ namespace GoogleMobileAds.Common { - public interface IAdManagerBannerClient : IBannerClient + public interface IAdManagerBannerClient : IBannerBaseClient { // Ad event fired when the ad sends a message to the application. event Action OnAppEvent; diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerInterstitialClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerInterstitialClient.cs index 6be4fa91a..b0548fcb7 100644 --- a/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerInterstitialClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Common/IAdManagerInterstitialClient.cs @@ -18,12 +18,12 @@ namespace GoogleMobileAds.Common { - public interface IAdManagerInterstitialClient : IInterstitialClient + public interface IAdManagerInterstitialClient : IInterstitialBaseClient { // Ad event fired when the ad sends a message to the application. event Action OnAppEvent; // Returns the next pre-loaded ad manager interstitial ad and null if no ad is available. - IAdManagerInterstitialClient PollAdManagerAd(string adUnitId); + IAdManagerInterstitialClient PollAd(string adUnitId); } } diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IBannerBaseClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IBannerBaseClient.cs new file mode 100644 index 000000000..5c1ff3caa --- /dev/null +++ b/source/plugin/Assets/GoogleMobileAds/Common/IBannerBaseClient.cs @@ -0,0 +1,79 @@ +// Copyright (C) 2015 Google, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +using GoogleMobileAds.Api; + +namespace GoogleMobileAds.Common +{ + public interface IBannerBaseClient + { + // Ad event fired when the banner ad has been received. + event EventHandler OnAdLoaded; + // Ad event fired when the banner ad has failed to load. + event EventHandler OnAdFailedToLoad; + // Ad event fired when the banner ad is opened. + event EventHandler OnAdOpening; + // Ad event fired when the banner ad is closed. + event EventHandler OnAdClosed; + // Ad event fired when the banner ad is estimated to have earned money. + event Action OnPaidEvent; + // Ad event fired when the banner ad is clicked. + event Action OnAdClicked; + // Ad event fired when the banner ad records an impression. + event Action OnAdImpressionRecorded; + + // Creates a banner view and adds it to the view hierarchy. + void CreateBannerView(string adUnitId, AdSize adSize, AdPosition position); + + // Creates a banner view and adds it to the view hierarchy with a custom position. + void CreateBannerView(string adUnitId, AdSize adSize, int x, int y); + + // Requests a new ad for the banner view. + void LoadAd(AdRequest request); + + // Shows the banner view on the screen. + void ShowBannerView(); + + // Hides the banner view from the screen. + void HideBannerView(); + + // Destroys a banner view. + void DestroyBannerView(); + + /// Returns the ad unit ID. + string GetAdUnitID(); + + // Returns the height of the BannerView in pixels. + float GetHeightInPixels(); + + // Returns the width of the BannerView in pixels. + float GetWidthInPixels(); + + // Set the position of the banner view using standard position. + void SetPosition(AdPosition adPosition); + + // Set the position of the banner view using custom position. + void SetPosition(int x, int y); + + // Indicates whether the last loaded ad is a collapsible banner. + bool IsCollapsible(); + + // Returns ad request Response info client. + IResponseInfoClient GetResponseInfoClient(); + + + } +} diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IBannerClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IBannerClient.cs index 336c99367..8bd7c9860 100644 --- a/source/plugin/Assets/GoogleMobileAds/Common/IBannerClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Common/IBannerClient.cs @@ -18,62 +18,5 @@ namespace GoogleMobileAds.Common { - public interface IBannerClient - { - // Ad event fired when the banner ad has been received. - event EventHandler OnAdLoaded; - // Ad event fired when the banner ad has failed to load. - event EventHandler OnAdFailedToLoad; - // Ad event fired when the banner ad is opened. - event EventHandler OnAdOpening; - // Ad event fired when the banner ad is closed. - event EventHandler OnAdClosed; - // Ad event fired when the banner ad is estimated to have earned money. - event Action OnPaidEvent; - // Ad event fired when the banner ad is clicked. - event Action OnAdClicked; - // Ad event fired when the banner ad records an impression. - event Action OnAdImpressionRecorded; - - // Creates a banner view and adds it to the view hierarchy. - void CreateBannerView(string adUnitId, AdSize adSize, AdPosition position); - - // Creates a banner view and adds it to the view hierarchy with a custom position. - void CreateBannerView(string adUnitId, AdSize adSize, int x, int y); - - // Requests a new ad for the banner view. - void LoadAd(AdRequest request); - - // Shows the banner view on the screen. - void ShowBannerView(); - - // Hides the banner view from the screen. - void HideBannerView(); - - // Destroys a banner view. - void DestroyBannerView(); - - /// Returns the ad unit ID. - string GetAdUnitID(); - - // Returns the height of the BannerView in pixels. - float GetHeightInPixels(); - - // Returns the width of the BannerView in pixels. - float GetWidthInPixels(); - - // Set the position of the banner view using standard position. - void SetPosition(AdPosition adPosition); - - // Set the position of the banner view using custom position. - void SetPosition(int x, int y); - - // Indicates whether the last loaded ad is a collapsible banner. - bool IsCollapsible(); - - // Returns ad request Response info client. - IResponseInfoClient GetResponseInfoClient(); - - - } + public interface IBannerClient : IBannerBaseClient { } } diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialBaseClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialBaseClient.cs new file mode 100644 index 000000000..ec1e32d28 --- /dev/null +++ b/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialBaseClient.cs @@ -0,0 +1,62 @@ +// Copyright 2015-2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +using GoogleMobileAds.Api; +using GoogleMobileAds.Api.AdManager; + +namespace GoogleMobileAds.Common +{ + public interface IInterstitialBaseClient + { + // Ad event fired when the interstitial ad has been received. + event EventHandler OnAdLoaded; + // Ad event fired when the interstitial ad has failed to load. + event EventHandler OnAdFailedToLoad; + // Ad event fired when the interstitial ad is estimated to have earned money. + event Action OnPaidEvent; + // Ad event fired when the full screen content has failed to be presented. + event EventHandler OnAdFailedToPresentFullScreenContent; + // Ad event fired when the full screen content has been presented. + event EventHandler OnAdDidPresentFullScreenContent; + // Ad event fired when the full screen content has been dismissed. + event EventHandler OnAdDidDismissFullScreenContent; + // Ad event fired when an ad impression has been recorded. + event EventHandler OnAdDidRecordImpression; + // Ad event fired when an ad has been clicked. + event Action OnAdClicked; + + // Creates an interstitial ad. + void CreateInterstitialAd(); + + // Verify if an interstitial ad is preloaded and is available to show. + bool IsAdAvailable(string adUnitId); + + // Loads an interstitial ad. + void LoadAd(string adUnitID, AdRequest request); + + // Shows the interstitial ad on the screen. + void Show(); + + // Returns the ad unit ID. + string GetAdUnitID(); + + // Returns ad request Response info client. + IResponseInfoClient GetResponseInfoClient(); + + // Destroys the interstitial ad. + void DestroyInterstitial(); + } +} diff --git a/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialClient.cs b/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialClient.cs index 3d9e1e766..7833f73e5 100644 --- a/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Common/IInterstitialClient.cs @@ -19,47 +19,9 @@ namespace GoogleMobileAds.Common { - public interface IInterstitialClient + public interface IInterstitialClient: IInterstitialBaseClient { - // Ad event fired when the interstitial ad has been received. - event EventHandler OnAdLoaded; - // Ad event fired when the interstitial ad has failed to load. - event EventHandler OnAdFailedToLoad; - // Ad event fired when the interstitial ad is estimated to have earned money. - event Action OnPaidEvent; - // Ad event fired when the full screen content has failed to be presented. - event EventHandler OnAdFailedToPresentFullScreenContent; - // Ad event fired when the full screen content has been presented. - event EventHandler OnAdDidPresentFullScreenContent; - // Ad event fired when the full screen content has been dismissed. - event EventHandler OnAdDidDismissFullScreenContent; - // Ad event fired when an ad impression has been recorded. - event EventHandler OnAdDidRecordImpression; - // Ad event fired when an ad has been clicked. - event Action OnAdClicked; - - // Creates an interstitial ad. - void CreateInterstitialAd(); - - // Verify if an interstitial ad is preloaded and is available to show. - bool IsAdAvailable(string adUnitId); - // Returns the next pre-loaded interstitial ad and null if no ad is available. IInterstitialClient PollAd(string adUnitId); - - // Loads an interstitial ad. - void LoadAd(string adUnitID, AdRequest request); - - // Shows the interstitial ad on the screen. - void Show(); - - // Returns the ad unit ID. - string GetAdUnitID(); - - // Returns ad request Response info client. - IResponseInfoClient GetResponseInfoClient(); - - // Destroys the interstitial ad. - void DestroyInterstitial(); } } diff --git a/source/plugin/Assets/GoogleMobileAds/Platforms/Android/AdManagerInterstitialClient.cs b/source/plugin/Assets/GoogleMobileAds/Platforms/Android/AdManagerInterstitialClient.cs index 67b5324e8..3f23bd64e 100644 --- a/source/plugin/Assets/GoogleMobileAds/Platforms/Android/AdManagerInterstitialClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Platforms/Android/AdManagerInterstitialClient.cs @@ -66,12 +66,7 @@ public bool IsAdAvailable(string adUnitId) return this._androidAdmanagerInterstitialAd.Call("isAdAvailable", adUnitId); } - public IInterstitialClient PollAd(string adUnitId) - { - return PollAdManagerAd(adUnitId); - } - - public IAdManagerInterstitialClient PollAdManagerAd(string adUnitId) + public IAdManagerInterstitialClient PollAd(string adUnitId) { this._androidAdmanagerInterstitialAd.Call("pollAd", adUnitId); return this; diff --git a/source/plugin/Assets/GoogleMobileAds/Platforms/Unity/AdManagerInterstitialClient.cs b/source/plugin/Assets/GoogleMobileAds/Platforms/Unity/AdManagerInterstitialClient.cs index cf51c4eec..8cffabc6f 100644 --- a/source/plugin/Assets/GoogleMobileAds/Platforms/Unity/AdManagerInterstitialClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Platforms/Unity/AdManagerInterstitialClient.cs @@ -24,7 +24,7 @@ public class AdManagerInterstitialClient : InterstitialClient, IAdManagerInterst { public event Action OnAppEvent; - public IAdManagerInterstitialClient PollAdManagerAd(string adUnitId) + public IAdManagerInterstitialClient PollAd(string adUnitId) { Debug.Log("Preloaded ads are not supported on the Unity editor platform."); return new AdManagerInterstitialClient(); diff --git a/source/plugin/Assets/GoogleMobileAds/Platforms/iOS/AdManagerInterstitialClient.cs b/source/plugin/Assets/GoogleMobileAds/Platforms/iOS/AdManagerInterstitialClient.cs index 8f50733e6..0ac9ee0cc 100644 --- a/source/plugin/Assets/GoogleMobileAds/Platforms/iOS/AdManagerInterstitialClient.cs +++ b/source/plugin/Assets/GoogleMobileAds/Platforms/iOS/AdManagerInterstitialClient.cs @@ -126,14 +126,8 @@ public bool IsAdAvailable(string adUnitId) return Externs.GAMUInterstitialIsPreloadedAdAvailable(adUnitId); } - // Returns the next pre-loaded interstitial ad and null if no ad is available. - public IInterstitialClient PollAd(string adUnitId) - { - return PollAdManagerAd(adUnitId); - } - // Returns the next pre-loaded ad manager interstitial ad and null if no ad is available. - public IAdManagerInterstitialClient PollAdManagerAd(string adUnitId) + public IAdManagerInterstitialClient PollAd(string adUnitId) { Externs.GAMUInterstitialPreloadedAdWithAdUnitID(this.InterstitialPtr, adUnitId); return this;