با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
اشیاء AdResult مکانیزمی را برای شناسایی تلاش های ناموفق برای بارگذاری آگهی ارائه می دهند. اگر مشکلی رخ دهد، متد AdResultis_successful() false را برمیگرداند. در این شرایط، فراخوانی متد AdResultad_error() یک شی AdError را با اطلاعات مربوط به خطا برمی گرداند.
در اینجا یک قطعه کد وجود دارد که اطلاعات موجود در هنگام بارگیری یک تبلیغ را نشان می دهد:
firebase::Future<firebase::gma::AdResult>load_ad_future=ad_view->LoadAd(request);// In a game loop, monitor the load ad statusif(load_ad_future.status()==firebase::kFutureStatusComplete){constfirebase::gma::AdResult*ad_result=load_ad_future.result();if(!ad_result.is_successful()){// There was an error loading the ad.constAdError&ad_error=ad_result.ad_error();firebase::gma::AdErrorCodecode=ad_error.code();std::stringdomain=ad_error.domain();std::stringmessage=ad_error.message();constfirebase::gma::ResponseInforesponse_info=ad_error.response_info();printf("Received error with domain: %s, code: %d, message: %s and response info: %s\n”,domain.c_str(),message.c_str(),response_info.ToString().c_str());}}
از این اطلاعات می توان برای تعیین دقیق تری استفاده کرد که چه چیزی باعث شکست بارگذاری تبلیغات شده است. به ویژه، برای خطاهای زیر دامنه com.google.admob در iOS و com.google.android.gms.ads در Android، پیام را می توان در این مقاله مرکز راهنمایی برای توضیح دقیق تر و اقدامات احتمالی که می توان برای حل این مشکل انجام داد، جستجو کرد.
تاریخ آخرین بهروزرسانی 2025-06-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-06-24 بهوقت ساعت هماهنگ جهانی."],[[["The Google Mobile Ads C++ SDK is deprecated and will be end-of-maintenance on June 17, 2025, with iOS and Android SDKs recommended as alternatives."],["Developers should use `AdResult` objects, specifically the `is_successful()` and `ad_error()` methods, to detect and diagnose ad loading failures."],["`AdError` objects provide detailed error information, including domain, code, and message, for troubleshooting failed ad loads."],["Error messages can be cross-referenced with the Google AdMob help center to identify the root cause and potential solutions."]]],["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024, and will reach End-of-Maintenance on June 17, 2025. AdMob iOS and Android SDKs are recommended alternatives. `AdResult` objects detect failed ad loads; `is_successful()` indicates success, and `ad_error()` retrieves an `AdError` object for failures. The `AdError` includes error domain, code, message, and response info, which can be used to troubleshoot. Refer to the Google help center for specific error resolutions.\n"]]