Hi,
I’m trying to add admob to my app but I can not show any thing in my app.
I currently using plugin.google.play.services. This is content in my build.setting file:
[lua]
settings =
{
orientation =
{
default = “portrait”,
supported = { “portrait”},
},
iphone =
{
plist =
{
UIPrerenderedIcon = true,
},
},
android =
{
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”,
},
},
plugins =
{
[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”
},
},
}
[/lua]
In “menu.lua” I add an interstitial Banner with code:
[lua]
local ads = require( “ads” )
local interstitialAppID = “ca-app-pub-1679022124514237/5808556504”
local adProvider = “admob”
local function adListener( event )
if ( event.isError ) then
print( “Error huhu” )
elseif ( event.phase == “loaded” ) then
print( “loaded hehe” )
elseif ( event.phase == “shown” ) then
print( “shown haha” )
end
end
ads.init( adProvider, interstitialAppID, adListener )
if ( ads.isLoaded(“interstitial”) ) then
ads.show(“interstitial”)
end
[/lua]
=> When I used newest version build 2810 my app crashed. After that, when I use version build 2329 it is not crash but my app show black screens and Game stucked.
(I tried type of Interstitial and Banner but nothing available.)
Can you help me to solve this problem?
Thanks!