Closed prantikv closed 6 years ago
The reward does get passes with the "REWARD" event. This works on a live video add and not while testing.
Thanks for posting this. This is how I used it in Ionic:
document.addEventListener('admob.rewardvideo.events.REWARD', (result) => {
console.log("Received event that reward video was watched");
});
Thanks!
This works for me, but I thing is better use event name string from admobFree object.
document.addEventListener(this.admobFree.events.REWARD_VIDEO_REWARD, (result) => {
this.points++
});
You can use like this with on method.
this.admobFree.on(this.admobFree.events.REWARD_VIDEO_LOAD).subscribe((res)=>{
console.log("REWARD_VIDEO_LOAD=> ",res);
})
this.admobFree.on(this.admobFree.events.REWARD_VIDEO_REWARD).subscribe((res)=>{
console.log("REWARD_VIDEO_REWARD=> ",res);
});
this.admobFree.on(this.admobFree.events.REWARD_VIDEO_START).subscribe((res)=>{
console.log("REWARD_VIDEO_START=> ",res);
})
this.admobFree.on(this.admobFree.events.REWARD_VIDEO_EXIT_APP).subscribe((res)=>{
console.log("REWARD_VIDEO_EXIT_APP=> ",res);
})
this.admobFree.on(this.admobFree.events.REWARD_VIDEO_CLOSE).subscribe((res)=>{
console.log("REWARD_VIDEO_CLOSE=> ",res);
})
Implementing Reward Video Ads I am getting all the events as mentioned here
Namely the following:
admob.rewardvideo.events.LOAD
admob.rewardvideo.events.LOAD_FAIL admob.rewardvideo.events.OPEN admob.rewardvideo.events.CLOSE admob.rewardvideo.events.EXIT_APP admob.rewardvideo.events.START admob.rewardvideo.events.REWARD
But the "REWARD" event is never fired. Moreover, there are no options to setup rewards to give when the user views the ads.
Kindly suggest ways go give rewards/coins/points when the user has viewed the ad. Currently, I am implementing this on the "CLOSE" event.
Thanks.
PS: "REWARD_VIDEO_START" event is not mentioned in the docs but does show up in code.