GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
class GADMediatedNativeAdNotificationSource : NSObject
Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform
some action (e.g. opening an in app browser or opening the iTunes store) when handling callbacks
from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK
by calling the relevant methods from this class.
-
Called by the adapter when it has registered an impression on the tracked view. Adapter should
only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES.
-
Called by the adapter when it has registered a user click on the tracked view. Adapter should
only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES.
-
Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen.
-
Must be called by the adapter just before the in-app modal screen opened by mediatedNativeAd is
dismissed.
-
Must be called by the adapter after the in-app modal screen opened by mediatedNativeAd is
dismissed.
-
Must be called by the adapter just before mediatedNativeAd leaves the application.
-
Called by the adapter when native video playback has begun or resumed.
-
Called by the adapter when native video playback has paused.
-
Called by the adapter when native video playback has ended.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-03 UTC.
[null,null,["Last updated 2021-03-03 UTC."],[],[],null,["# GoogleMobileAds Framework Reference\n\nGADMediatedNativeAdNotificationSource\n=====================================\n\n class GADMediatedNativeAdNotificationSource : NSObject\n\nNotifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform\nsome action (e.g. opening an in app browser or opening the iTunes store) when handling callbacks\nfrom GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK\nby calling the relevant methods from this class.\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidRecordImpression(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidRecordImpression:)\n\n `\n ` \n Called by the adapter when it has registered an impression on the tracked view. Adapter should\n only call this method if -\\[GADMAdNetworkAdapter handlesUserImpressions\\] returns YES. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidRecordImpression(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidRecordClick(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidRecordClick:)\n\n `\n ` \n Called by the adapter when it has registered a user click on the tracked view. Adapter should\n only call this method if -\\[GADMAdNetworkAdapter handlesUserClicks\\] returns YES. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidRecordClick(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdWillPresentScreen(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdWillPresentScreen:)\n\n `\n ` \n Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdWillPresentScreen(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdWillDismissScreen(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdWillDismissScreen:)\n\n `\n ` \n Must be called by the adapter just before the in-app modal screen opened by mediatedNativeAd is\n dismissed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdWillDismissScreen(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidDismissScreen(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidDismissScreen:)\n\n `\n ` \n Must be called by the adapter after the in-app modal screen opened by mediatedNativeAd is\n dismissed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidDismissScreen(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdWillLeaveApplication(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdWillLeaveApplication:)\n\n `\n ` \n Must be called by the adapter just before mediatedNativeAd leaves the application. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdWillLeaveApplication(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n[Mediated Native Video Ad Notifications\n--------------------------------------](#/Mediated%20Native%20Video%20Ad%20Notifications)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidPlayVideo(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidPlayVideo:)\n\n `\n ` \n Called by the adapter when native video playback has begun or resumed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidPlayVideo(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidPauseVideo(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidPauseVideo:)\n\n `\n ` \n Called by the adapter when native video playback has paused. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidPauseVideo(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)\n\n- `\n ``\n ``\n `\n\n ### [mediatedNativeAdDidEndVideoPlayback(_:)](#/c:objc(cs)GADMediatedNativeAdNotificationSource(cm)mediatedNativeAdDidEndVideoPlayback:)\n\n `\n ` \n Called by the adapter when native video playback has ended. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidEndVideoPlayback(_ mediatedNativeAd: ../Protocols/GADMediatedNativeAd.html)"]]