বিজ্ঞাপন লোড ত্রুটি

যেসব ক্ষেত্রে একটি বিজ্ঞাপন লোড হতে ব্যর্থ হয়, সেখানে একটি কলব্যাক ডাকা হয় যা একটি LoadAdError অবজেক্ট প্রদান করে।

কোনও বিজ্ঞাপন লোড না হলে কী তথ্য পাওয়া যায় তা নিম্নলিখিত উদাহরণে দেখানো হয়েছে:

কোটলিন

override fun onAdFailedToLoad(adError: LoadAdError) {
  // Gets the error code. See
  // https://developers.google.com/admob/android/early-access/nextgen/reference/com/google/android/libraries/ads/mobile/sdk/common/LoadAdError.ErrorCode
  // for a list of possible codes.
  val errorCode = adError.code
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  val errorMessage = adError.message
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/beta/response-info
  // for more information.
  val responseInfo = adError.responseInfo
  // All of this information is available using the error's toString() method.
  Log.d("Ads", adError.toString())
}

জাভা

@Override
public void onAdFailedToLoad(@NonNull LoadAdError adError) {
  // Gets the error code. See
  // https://developers.google.com/admob/android/early-access/nextgen/reference/com/google/android/libraries/ads/mobile/sdk/common/LoadAdError.ErrorCode
  // for a list of possible codes.
  ErrorCode errorCode = adError.getCode();
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  String errorMessage = adError.getMessage();
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/beta/response-info
  // for more information.
  ResponseInfo responseInfo = adError.getResponseInfo();
  // All of this information is available using the error's toString() method.
  Log.d("Ads", adError.toString());
}
,

যেসব ক্ষেত্রে একটি বিজ্ঞাপন লোড হতে ব্যর্থ হয়, সেখানে একটি কলব্যাক ডাকা হয় যা একটি LoadAdError অবজেক্ট প্রদান করে।

কোনও বিজ্ঞাপন লোড না হলে কী তথ্য পাওয়া যায় তা নিম্নলিখিত উদাহরণে দেখানো হয়েছে:

কোটলিন

override fun onAdFailedToLoad(adError: LoadAdError) {
  // Gets the error code. See
  // https://developers.google.com/admob/android/early-access/nextgen/reference/com/google/android/libraries/ads/mobile/sdk/common/LoadAdError.ErrorCode
  // for a list of possible codes.
  val errorCode = adError.code
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  val errorMessage = adError.message
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/beta/response-info
  // for more information.
  val responseInfo = adError.responseInfo
  // All of this information is available using the error's toString() method.
  Log.d("Ads", adError.toString())
}

জাভা

@Override
public void onAdFailedToLoad(@NonNull LoadAdError adError) {
  // Gets the error code. See
  // https://developers.google.com/admob/android/early-access/nextgen/reference/com/google/android/libraries/ads/mobile/sdk/common/LoadAdError.ErrorCode
  // for a list of possible codes.
  ErrorCode errorCode = adError.getCode();
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  String errorMessage = adError.getMessage();
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/beta/response-info
  // for more information.
  ResponseInfo responseInfo = adError.getResponseInfo();
  // All of this information is available using the error's toString() method.
  Log.d("Ads", adError.toString());
}