Answer the question
In order to leave comments, you need to log in
How to fix Admob rewarded video ad error?
Hello!
I am developing an android project. I added video ads from Admob to the project, but when requesting ads, error 3 is returned.
The reward value in the settings was 15.
I tried to request video ads using test id and production id, nothing happened.
This is my code
val rewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this)
rewardedVideoAd.loadAd(
getString(R.string.main_activity_rewarded_ad_id),
AdRequest.Builder().build()
)
rewardedVideoAd.rewardedVideoAdListener = object : RewardedVideoAdListener {
override fun onRewardedVideoAdClosed() {
Timber.d("onRewardedVideoAdClosed")
}
override fun onRewardedVideoAdLeftApplication() {
Timber.d("onRewardedVideoAdLeftApplication")
}
override fun onRewardedVideoAdLoaded() {
Timber.d("onRewardedVideoAdLoaded")
rewardedVideoAd.show()
}
override fun onRewardedVideoAdOpened() {
Timber.d("onRewardedVideoAdOpened")
}
override fun onRewardedVideoCompleted() {
Timber.d("onRewardedVideoCompleted")
}
override fun onRewarded(p0: RewardItem?) {
Timber.d("onRewarded")
}
override fun onRewardedVideoStarted() {
Timber.d("onRewardedVideoStarted")
}
override fun onRewardedVideoAdFailedToLoad(p0: Int) {
Timber.d("onRewardedVideoAdFailedToLoad")
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question