我正在尝试将奖励视频放到我的应用中,但它似乎无法处理,因为它既不会调用onRewardedVideoAdLoaded
也不会调用onRewardedVideoAdFailedToLoad
其他所有广告都可以正常工作,只有奖励广告无法正常工作
代码在这里:
this.rewardedVideoAd.loadAd(getString(R.string.reward_ad_unit_id), this.buildAdRequest().build());
protected AdRequest.Builder buildAdRequest() {
Bundle extras = new Bundle();
extras.putString("max_ad_content_rating", "T");
AdRequest.Builder adRequest = new AdRequest.Builder().addNetworkExtrasBundle(AdMobAdapter.class, extras).tagForChildDirectedTreatment(false);
if (this.activeUser != null)
adRequest.setGender(this.activeUser.getGender());
if (this.activeUser != null && this.activeUser.getBirthday() != null)
adRequest.setBirthday(this.activeUser.getBirthday());
if (this.loc != null)
adRequest.setLocation(this.loc);
return adRequest;
}
@Override
public void onRewardedVideoAdLoaded() {
System.out.println("LOADED");
}
@Override
public void onRewardedVideoAdFailedToLoad(int i) {
System.out.println("ERROR");
this.adFailed = true;
}
这些消息都没有被打印,当我按下按钮以显示rewardedVideoAd.isLoaded()
时,它总是返回false
我做错了什么...应该花多长时间