Admob test ads while app isnt published (closed alpha)

Hey Guys,
im trying to build ads into my app to test them when my app will go live some day.
My app is currently in closed beta, so i cant choose it for admob to be checked and aproved but there should be a way to test ads even without having an app in the play store, right?
Admobs gives me an AppID and UnitIDs and im implementing them into my Code but i always getting the respond:

2022-05-11 11:21:34.253 12657-12657/eu.skaja.games.solitaireshowdown I/Corona: ERROR: admob.load(adType, options), Error while loading ad {
ā€œCodeā€: 3,
ā€œMessageā€: ā€œAccount not approved yet. https:\/\/support.google.com\/admob\/answer\/9905175#1ā€,
ā€œDomainā€: ā€œcom.google.android.gms.adsā€,
ā€œCauseā€: ā€œnullā€,
ā€œResponse Infoā€: {
ā€œResponse IDā€: ā€œnullā€,
ā€œMediation Adapter Class Nameā€: ā€œā€,
ā€œAdapter Responsesā€: []
}
}

I veryfied my payment method but i still get the error ā€œAccount not approved yet.ā€.
I also saw that i can set test Devices for my ads. Admobs provides me an Generated AdMob Test ID in the logs but how can i use it in solar2d / lua?
I also have testMode=true in my init function but nothing is workingā€¦

Here is my Ad Code:

ā€“ adMobV2

local admob = require( ā€œplugin.admobā€ )

ā€“ AdMob listener function

local function adListener( event )

if ( event.phase == "init" ) then  -- Successful initialization

    -- Load an AdMob interstitial ad

    admob.load( "interstitial", { adUnitId="ca-app-pub-XXXXXXXXXXXXX558/XXXXXXX022" } )

end

end

ā€“ Initialize the AdMob plugin

admob.init( adListener, { appId=ā€œca-app-pub-XXXXXXXXXXXXX558~XXXXXXX822ā€, testMode=true } )

ā€“ Sometime later, show the interstitial ad

if ( admob.isLoaded( ā€œinterstitialā€ ) ) then

admob.show( "interstitial" )

end

my build.settings:

    ["plugin.admob"] =
    {
        publisherId = "com.coronalabs"
    },

android =

{

    googlePlayGamesAppId = "XXXXXXXXXX",

   

    applicationChildElements =

    {

        [[

            <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"

                android:value="ca-app-pub-XXXXXXXXXXXXX558~XXXXXXX822"/>

        ]],

    },

    usesPermissions =

    {

        "android.permission.INTERNET",

        "android.permission.ACCESS_NETWORK_STATE",

    },

So my question is: How can i test ads in closed alpha, even without beein aproved by admobs or have app in the playstore?

Hey! Interestingly enough iā€™m also implementing ads for the first timešŸ˜ for a game that isnā€™t in the play store. Also using admob pluginšŸ˜ I just managed to get through this first stage. Meaning the plugin successfully inits, loads and shows interstitial ads. So yes, you can test ads without having the app in a store(was also wondering that a week ago)!
I hope i can help.

Did you add a test device in your admob account? If not then log into your admob account => Setting = > Add test Device.

And just in case you maybe didnā€™t know, there is a really good tutorial on implementing ads on the main solar2d website Solar2D Documentation ā€” Tutorials | Basics (coronalabs.com)

Also i noticed that when i clicked on the home icon in the admob dashboard, the first thing i see is something like a notification showing my account is approved, looks exactly like this: your account is approved admob - Google Search

So if your account maybe isnt approved yet, you should probably get the news there soon? I hope!
Good luckā˜ŗ

This could be a red herring, but Iā€™ve noticed recently that AdMob wouldnā€™t serve ads to my devices when the app had been installed via ADB, but everything worked fine when the app was installed through the Play Store. If youā€™re side loading onto your test device, you might try installing the build via Play and see if that helps.

@colinmorgan i tried your soulution but even if i download it from the story, its not working :confused:

@proV that was exaclty what i was looking for! I added my device as an test device on admob and now i get an ad debug on a gesture. Thanks!
But ads are still not loading for me, its still the same error, that my account isnt approved.
Your 2nd tip also helped me, because i have not confirmed my adress in admob. Admob have to send me an letter with an PIN Code.
Support says i need to press the Admob PIN Button on the dashboard / homepage but i dont have such a button shownā€¦
Any ideas how i can trigger to send the PIN to my adress?

Im glad i could helpā˜ŗ
as for the PIN code: I personally did not need to confirm my address for my admob account to be approved, so sadly i do not know how to help herešŸ˜• maybe if someone else reading this was in similar situation can help?

Did you recently create an admob account? Maybe it just takes time for them to send you the pin. I found this on their page: ā€œWhen you first sign up for AdMob, your account is reviewed before itā€™s approved. This typically takes up to 24 hours, but in rare cases can take up to 2 weeks.ā€

I also found this: Account not approved yet. - Google AdMob Community maybe it can helpā˜ŗ

@proV my account cant be approved until i confirmed my currently adress. I was searching for hours now to find where i can send another PIN to my adress. Google support and community couldnt help meā€¦
My Account is very old, its from 2017 and i saw that i have an old AdSense Account. I logged in there and there i saw the option to resend the PIN to my adress! To find this place was almost impossible lol.
So now i have to wait 2-3 weeks to get approvedā€¦
Thanks @proV for your help :smiley: i hope i will be finally approved after entering the PIN

1 Like

Well congrats on finding a solution!!! Its hard solving out these little weird problems. I lost half my mind trying to make the testing of ads workšŸ˜ persistence is the keyšŸ˜
you are quite welcome. Good luck to you and your app!

1 Like