I’m losing my mind trying to get admob to work. I’ve simplified my code as much as possible. I think I’m just overlooking something simple. When I run on my device nothing shows up.
[lua]display.setStatusBar( display.HiddenStatusBar )
local ads = require( “ads” )
local function adListener( event )
if ( event.isError ) then
– Failed to receive an ad
end
end
ads.init( “admob”, “ca-app-pub-7713598493236796/9687725067”, adListener )
ads.show( “banner”, { x=0, y=0, appId=“ca-app-pub-7713598493236796/9687725067” } )[/lua]
Here is my build settings
[lua]settings =
{
plugins =
{
[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, android=true }
},
[“shared.android.support.v4”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android=true }
},
[“plugin.coronaAds”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, android=true }
},
[“plugin.chartboost”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, android=true }
},
[“plugin.adcolony”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, android=true }
},
[“CoronaProvider.gameNetwork.apple”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true }
},
},
orientation =
{
default = “landscapeRight”,
supported =
{
“landscapeRight”,
“landscapeLeft”,
},
},
iphone =
{
plist =
{
NSAppTransportSecurity = { NSAllowsArbitraryLoads=true },
NSLocationAlwaysUsageDescription = {"" },
NSLocationWhenInUseUsageDescription = {"" },
NSCalendarsUsageDescription = “Testing”,
NSPhotoLibraryUsageDescription = “Testing”,
NSCameraUsageDescription = “Testing” ,
MinimumOSVersion = “7.1”,
ITSAppUsesNonExemptEncryption = false,
CFBundleIconFiles =
{
“Icon.png”,
“Icon@2x.png”,
“Icon-60.png”,
“Icon-60@2x.png”,
“Icon-60@3x.png”,
“Icon-72.png”,
“Icon-72@2x.png”,
“Icon-76.png”,
“Icon-76@2x.png”,
“Icon-Small.png”,
“Icon-Small@2x.png”,
“Icon-Small@3x.png”,
“Icon-Small-40.png”,
“Icon-Small-40@2x.png”,
“Icon-Small-50.png”,
“Icon-Small-50@2x.png”,
},
},
},
android =
{
usesPermissions =
{
“android.permission.VIBRATE”,
“android.permission.INTERNET”,
“android.permission.ACCESS_COARSE_LOCATION”,
“android.permission.ACCESS_FINE_LOCATION”,
“android.permission.ACCESS_NETWORK_STATE”,
“com.google.android.providers.gsf.permissions.READ_GSERVICES”
},
applicationChildElements =
{
[[android:configChanges=“keyboardHidden|orientation|screenSize”/>]]
},
},
window =
{
titleText =
{
default = “ZOMBIES!”,
},
},
}[/lua]
here is my config
[lua]-- config.lua
application =
{
content =
{
width = 480,
height = 620,
scale = “letterbox” – zoom to screen dimensions (may add extra space at top or sides)
},
}[/lua]