ResponseInfo

public final class ResponseInfo


Information about an ad response.

Summary

Public constructors

ResponseInfo(
    String adapterClassName,
    String responseId,
    @NonNull Bundle responseExtras,
    AdSourceResponseInfo loadedAdSourceResponseInfo,
    @NonNull List<@NonNull AdSourceResponseInfo> adSourceResponses
)

Public methods

final @NonNull List<@NonNull AdSourceResponseInfo>

List of all AdSourceResponseInfo containing metadata for each ad source included in the ad response.

final String

The mediation adapter class name of the ad source that loaded the ad.

final AdSourceResponseInfo

The AdSourceResponseInfo corresponding to the ad source that was used to load the ad.

final @NonNull Bundle

Extra information about the ad response.

final String

The response ID for the loaded ad.

Public constructors

ResponseInfo

public ResponseInfo(
    String adapterClassName,
    String responseId,
    @NonNull Bundle responseExtras,
    AdSourceResponseInfo loadedAdSourceResponseInfo,
    @NonNull List<@NonNull AdSourceResponseInfo> adSourceResponses
)
Parameters
String adapterClassName

The mediation adapter class name of the ad source that loaded the ad. In the case of a mediated ad response, this is the name of the class that was responsible for performing the ad request and rendering the ad. For non-mediated responses, this value will be "com.google.ads.mediation.admob.AdMobAdapter". null if the ad failed to load.

String responseId

The response ID for the loaded ad. Can be used to look up ads in the Ad Review Center. null if the ad failed to load.

@NonNull Bundle responseExtras

Extra information about the ad response.

AdSourceResponseInfo loadedAdSourceResponseInfo

The AdSourceResponseInfo corresponding to the ad source that was used to load the ad. null if the ad failed to load.

@NonNull List<@NonNull AdSourceResponseInfo> adSourceResponses

List of all AdSourceResponseInfo containing metadata for each ad source included in the ad response. Can be used to debug mediation waterfall execution.

Public methods

getAdSourceResponses

public final @NonNull List<@NonNull AdSourceResponseInfogetAdSourceResponses()

List of all AdSourceResponseInfo containing metadata for each ad source included in the ad response. Can be used to debug mediation waterfall execution.

getAdapterClassName

public final String getAdapterClassName()

The mediation adapter class name of the ad source that loaded the ad. In the case of a mediated ad response, this is the name of the class that was responsible for performing the ad request and rendering the ad. For non-mediated responses, this value will be "com.google.ads.mediation.admob.AdMobAdapter". null if the ad failed to load.

getLoadedAdSourceResponseInfo

public final AdSourceResponseInfo getLoadedAdSourceResponseInfo()

The AdSourceResponseInfo corresponding to the ad source that was used to load the ad. null if the ad failed to load.

getResponseExtras

public final @NonNull Bundle getResponseExtras()

Extra information about the ad response.

getResponseId

public final String getResponseId()

The response ID for the loaded ad. Can be used to look up ads in the Ad Review Center. null if the ad failed to load.