I @roaminggamer, thanks for the help
Let’s answer your questions :
B)
If I quit app an try start the app again, the banner doesn’t show
If I force kill the app an try start the app again, the banner work
-
It’s a example that someone put in the forum with this same problem (log below)
-
yeap, I call init every time that app start
-
yes, I created a timer.performWithDelay and call a function tho show the banner :
timer.performWithDelay( 2000, showBanner, 3)
local function showBanner()
print("############### Trying show banner #############")
if admob.isLoaded(“banner”) then
print("############### Show banner #############")
admob.show( “banner” )
end
end
Blockquote
- APP first run
===========================================
---------- Device Log Starts ----------
Jan 05 13:57:16.567 SM-G950F: wai
Jan 05 13:57:23.402 SM-G950F: Platform: SM-G950F / ARM64 / 9 / Mali-G71 / OpenG
2020.3635 / português | BR | pt_BR | pt
Jan 05 13:57:23.427 SM-G950F: ERROR: admob.is
Jan 05 13:57:23.427
Jan 05 13:57:23.452 Loaded(adType [, options]), admob.init() must be called before calling other API functions
Jan 05 13:57:23.452 SM-G950F: WARNING: admob.init(listener, options), AppId is ignored and should be in build.settings
Jan 05 13:57:23.453
Jan 05 13:57:25.087 SM-G950F: plugin
Jan 05 13:57:25.087 .admob: 1.2.6 (SDK: 0)
Jan 05 13:57:25.121 SM-G950F:
Jan 05 13:57:25.122 phase init
SM-G950F: provider admob
SM-G950F: name adsRequest
SM-G950F: isError false
SM-G950F: ---------------------------
SM-G950F: ============= INIT =====================
Jan 05 13:57:25.343 SM-G950F: wait for provider
Jan 05 13:57:27.797 SM-G950F: type
Jan 05 13:57:27.798 banner
SM-G950F: name adsRequest
SM-G950F: phase loaded
SM-G950F: provider admob
SM-G950F: data {“adUnitId”:“ca-app-pub-XXXX106474799480”}
SM-G950F: isError false
SM-G950F: ---------------------------
Jan 05 13:57:27.851 SM-G950F: type ban
Jan 05 13:57:27.852 ner
SM-G950F: name adsRequest
SM-G950F: phase displayed
SM-G950F: provider admob
SM-G950F: data {“adUnitId”:“ca-app-pub-XXXX106474799480”}
SM-G950F: isError false
SM-G950F: ---------------------------
Jan 05 13:57:36.283 SM-G950F: TouchDown inte
Jan 05 13:57:36.283 nt received, starting ActiveLaunch
- After exit the app and try to run again
===========================================
Jan 05 13:57:36.629 SM-G950F: Platform: SM-G950F / ARM64 / 9 / Mali-G71 / OpenGL ES 3.2 v1.r16p0-01rel0.###other-sha0123456789ABCDEF0### / 2020.3635 / português | BR | pt_BR | pt
Jan 05 13:57:36.657 SM-G950F: ERROR: admob
Jan 05 13:57:36.657
Jan 05 13:57:36.659 .isLoaded(adType [, options]), admob.init() must be called before calling other API functions
Jan 05 13:57:36.659 SM-G950F: WARNING: admob.init(listener, options), AppId is ignored and should be in build.settings
Jan 05 13:57:36.659
Observation:
-
How can you can see, when I tried to run the app in the second time, the event.phase == “init” doesn’t is called in the listener and the .isLoaded doesn’t work to check if there’s a cached banner, when I tried to call this I got “ERROR: admob.isLoaded(adType [, options]), You must wait for the ‘init’ event before calling other API functions”
-
When I force the app quit, the app can show the banner. Maybe there’s a cache, but I can’t check if the cache exist and If I try to force the admob.init() I has errors inform me that I can’t use admob.init()