Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to work with free admob events?

$
0
0

@estacho999 wrote:

I’m having trouble following the user’s reward after watching a video in my app. It happens that the banner is displayed correctly, the video is also uploaded. But when I click on X to close the video, my app closes and I can not figure out what it can be.

    //calls and displays the reward video
    launchVideoReward() {
        let rewardConfig: AdMobFreeRewardVideoConfig = {
            autoShow: true,
            id: 'ca-app-pub-8000726989219599/7547043373'
        };
        this.admob.rewardVideo.config(rewardConfig);
        this.admob.rewardVideo.prepare().then(() => {
            console.log('video executado com sucesso');
        })
    }
    
    //manipulates available events
    ad_events(){
        document.addEventListener('admob.rewardvideo.events.CLOSE', function(event) {
            console.log(event)
            alert('video closed');
            this.admob.rewardvideo.prepare();
        })
    }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>