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?