Hi Soufien,
Thank you for reaching out to us.
With regard to your concern, let me answer it below.
1-
protected <RewardedVideoAdListener> void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.custom_dialog);
yes = (Button) findViewById(R.id.btn_yes);
no = (Button) findViewById(R.id.btn_no);
yes.setOnClickListener(this);
no.setOnClickListener(this);
mAd = (RewardedVideoAd) MobileAds.getRewardedVideoAdInstance(c);
mAd.setRewardedVideoAdListener((RewardedVideoAdListener) c);
2-
public void loadRewardedVideo() {
mAd.loadAd(Constant.rewarded_ad_id,
new AdRequest.Builder()
.build());
}
It seems that you're using the previous version of the v19.5.0 below. Kindly make sure that you're using the latest AdMob SDK to avoid any errors in your implementation.
Regards,
|
||||||