Open ghost opened 3 years ago
this works btw:
admob.preloadRewardedVideoAd({
testing: true,
iosAdPlacementId: "ca-app-pub-XXXXXX/YYYYY2", // add your own
androidAdPlacementId: "ca-app-pub-AAAAAAAA/BBBBBB2", // add your own
keywords: ["keyword1", "keyword2"], // add keywords for ad targeting
}).then(
function() {
admob.showRewardedVideoAd({
onRewarded: (reward) => {
console.log("onRewarded");
this.message = "watched rewarded video";
},
onRewardedVideoAdLeftApplication: () => console.log("onRewardedVideoAdLeftApplication"),
onRewardedVideoAdClosed: () => console.log("onRewardedVideoAdClosed"),
onRewardedVideoAdOpened: () => console.log("onRewardedVideoAdOpened"),
onRewardedVideoStarted: () => console.log("onRewardedVideoStarted"),
onRewardedVideoCompleted: () => console.log("onRewardedVideoCompleted"),
}).then(
function() {
console.log("RewardedVideoAd showing");
},
function(error) {
console.log("admob showRewardedVideoAd error: " + error);
}
)
},
function(error) {
console.log("admob preloadRewardedVideoAd error: " + error);
}
)
I can not figure it out why Interstitial fails, but any other methods just work as expected.
Did you ever figure it out? I can't even get a banner to show. The only thing I could get working was the reward video when using the preload reward video code like you have posted.
I just copied the code while I can set Banner and Video (in testing mode) and it works like a charm, But Interstitial fails as:
and here is the code:
p.s. {N} v. 7