Hello, I have an issue with admob ads. I implemented admob ads into my game, and tried it on three different devices, but it only worked on one of them. On the other two, it returned an error mesage saying: Something happened internally in the AdmobSDK; for instance, an invalid response was received from the ad server.
My code.
Main.lua
[lua]
local ads = require( “ads” )
local interstitialAppID = “ca-app-pub--------”
local adProvider = “admob”
local function adListener( event )
local name = composer.getSceneName( “current” )
if event.isError then
local alert = native.showAlert(“error”, event.response)
ads.load( “interstitial”, { appId=interstitialAppID, testMode=false } )
elseif name == “Campaign” or name == “Menu” or name == “Cut” or name == “Cut1” then
ads.show(“interstitial”,{x=0,y=0,appID = interstitialAppID})
end
end
ads.init(adProvider,interstitialAppID,adListener)
ads.load( “interstitial”, { appId=interstitialAppID, testMode=false } )
composer.gotoScene( “Menu” )
[/lua]
In build.settings
[lua]
plugins =
{
[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”
},
},
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”
},
[/lua]
Does anyone here know what could be the problem? It’s really strange. Thank you.