GADAdDelegate

@protocol GADAdDelegate <NSObject>

Delegate methods common to multiple ad types.

  • Asks the delegate if the audio session category can be changed while displaying an ad. Return NO to prevent the Google Mobile Ads SDK from changing the audio session category. The default behavior if unimplemented is to return YES.

    Declaration

    Swift

    optional func ad(_ ad: Any!, shouldChangeAudioSessionToCategory audioSessionCategory: Any!) -> Any!

    Objective-C

    - (BOOL)ad:(nonnull id)ad
        shouldChangeAudioSessionToCategory:(nonnull NSString *)audioSessionCategory;