T
T
TikTak12362019-02-19 08:25:28
Android
TikTak1236, 2019-02-19 08:25:28

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

1 answer(s)
T
TikTak1236, 2019-02-19
@TikTak1236

Didn't do anything, but everything started working by itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question