광고를 로드하지 못하면 LoadAdError
객체를 제공하는 실패 콜백이 호출됩니다.
다음 코드 스니펫은 보상형 광고가 로드되지 않으면 오류 정보를 검색합니다.
onAdFailedToLoad: (ad, loadAdError) {
// Gets the domain from which the error came.
String domain = loadAdError.domain;
// Gets the error code. See
// https://developers.google.com/android/reference/com/google/android/gms/ads/AdRequest
// and https://developers.google.com/admob/ios/api/reference/Enums/GADErrorCode
// for a list of possible codes.
int code = loadAdError.code;
// A log friendly string summarizing the error.
String message = loadAdError.message;
// Get response information, which may include results of mediation requests.
ResponseInfo? responseInfo = loadAdError.responseInfo;
}
이 정보를 사용하여 광고를 로드하지 못한 원인을 보다 정확하게
파악할 수 있습니다. 특히 iOS의 경우 com.google.admob
도메인, Android의 경우 com.google.android.gms.ads
도메인에 있는 오류의 경우 이 고객센터 도움말에서 자세한 설명 및 문제 해결을 위해 취할 수 있는 조치를 찾을 수 있습니다.