Я внедрил CMP, «сертифицированную платформу управления согласием (CMP)». Согласно запросу AdMob, я следил за реализацией Google здесь: Но я все еще получаю сообщение об ошибке в консоли AdMob: «Некоторые запросы объявлений на ваш инвентарь из ЕЭЗ, в Великобритании или Швейцарии отсутствует строка TC"
Основной код активности, как показано ниже:
googleMobileAdsConsentManager =
GoogleMobileAdsConsentManager.getInstance(getApplicationContext());
googleMobileAdsConsentManager.gatherConsent(
this,
consentError -> {
if (consentError != null) {
// Consent not obtained in current session.
}
if (googleMobileAdsConsentManager.canRequestAds()) {
initializeMobileAdsSdk();
}
if (googleMobileAdsConsentManager.isPrivacyOptionsRequired()) {
// Regenerate the options menu to include a privacy setting.
invalidateOptionsMenu();
}
});
// This sample attempts to load ads using consent obtained in the previous session.
if (googleMobileAdsConsentManager.canRequestAds()) {
initializeMobileAdsSdk();
}
Я внедрил CMP, «сертифицированную платформу управления согласием (CMP)». Согласно запросу AdMob, я следил за реализацией Google здесь: Но я все еще получаю сообщение об ошибке в консоли AdMob: «Некоторые запросы объявлений на ваш инвентарь из ЕЭЗ, в Великобритании или Швейцарии отсутствует строка TC" Основной код активности, как показано ниже: [code] googleMobileAdsConsentManager = GoogleMobileAdsConsentManager.getInstance(getApplicationContext()); googleMobileAdsConsentManager.gatherConsent( this, consentError -> { if (consentError != null) { // Consent not obtained in current session.
}
if (googleMobileAdsConsentManager.canRequestAds()) { initializeMobileAdsSdk(); }
if (googleMobileAdsConsentManager.isPrivacyOptionsRequired()) { // Regenerate the options menu to include a privacy setting. invalidateOptionsMenu(); } });
// This sample attempts to load ads using consent obtained in the previous session. if (googleMobileAdsConsentManager.canRequestAds()) { initializeMobileAdsSdk(); } [/code] Есть предложения?