Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just Testing: Fails on Interstitial BUT Banner and Video works! #90

Open
ghost opened this issue Nov 20, 2020 · 2 comments
Open

Just Testing: Fails on Interstitial BUT Banner and Video works! #90

ghost opened this issue Nov 20, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 20, 2020

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:

JS: Treating this deviceId as testdevice: 9627E477BBDDCCD2352E6BB85F8C052E
JS: onAdFailedToLoad: 3
JS: admob createInterstitial error: 3

and here is the code:

    admob.createInterstitial( {
        testing: true,
        androidInterstitialId: "", // add your own
        keywords: ["keyword1", "keyword2"], // add keywords for ad targeting
        onAdClosed: function () { console.log("interstitial closed") }
    } ).then(
        function() {
            console.log("admob createInterstitial done");
        },
        function(error) {
            console.log("admob createInterstitial error: " + error);
        }
    )

p.s. {N} v. 7

@ghost
Copy link
Author

ghost commented Nov 20, 2020

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.

@rob4226
Copy link

rob4226 commented Apr 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant