Yes, a rewardedVideo should be displayed if isLoaded() returns true.
The plugin relies on the AdMob SDK to report the ad availability status and I’m not sure why isLoaded would return true if no ad is available for display.
Yes, a rewardedVideo should be displayed if isLoaded() returns true.
The plugin relies on the AdMob SDK to report the ad availability status and I’m not sure why isLoaded would return true if no ad is available for display.
I also encounter problems at scene change when the new upcoming scene is doing this:
if \_G.adson==true then -- now load and show banner and interstitial ads: if admob.isLoaded("banner")==true then -- show the banner admob.show( "banner",{y="top"} ) else -- try to load the banner now again: admob.load( "banner", { adUnitId=\_G.admobBannerID, childSafe=false } ) end -- now loading the interstitial ad: if admob.isLoaded("interstitial")==false then admob.load( "interstitial", { adUnitId=\_G.admobInterstitialID, childSafe=false } ) else admob.show("interstitial") end else ... end
I get a black screen (stuck in loading screen!) when doing this on an Android device (Galaxy Tab Model SM-T110).
But when I remove the line admob.show(“interstitial”) it is working and showing the new scene.
What can cause this strange behaviour? The scene seems to be working in the background right until the line admob.show(“interstitial”) is called.
Be sure you only show ads *after* the scene change is complete.
Oh! So it would be best to do all ad related code with loading and showing NOT in the
function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then ....
but in the following
elseif ( phase == "did" ) then ....
part of the scenes code, right?
Yes, that is correct
That explains a lot of my headaches
Thx!!!
I’m now testing the app with childSafe set to true but can’t find any ads in the game now.
Is this why there are not many childSafe ads to show, or what can cause this?
Android.
Setting childSafe to true for any ad type may affect the fill rate as it will be limiting the number of ads available.
That’s what I thought… but I now have tested with childSafe=false and testMode=true and don’t see anything. Don’t know why.
AdMob does not serve test ads for Rewared Videos at the moment. Only live ads will have a fill.
However keep in mind that during plugin development it was also noticed that rewarded videos in general have a lower fill rate especially in non-US territories.
But I’m also testing with banner and interstitial ads and in the log I can see that the plugin init is reached and testmode for the device is working… but nothing can be seen.
I’d suggest you add
print(json.prettify(event))
at the top of your admob listener and monitor the Android logcat for admob events, and to verify your ads are getting loaded properly.
(Remember to add local json = require(“json”) at the top of your module to add json support if you don’t already have it)
Thank you!
It seems the init now is reached but regarding to the messages no ads are available… but I’m using testMode=true… so I have no idea why this happens.
Keep in mind that testMode is set during init(), and not during load().
Ingemar,
Can you confirm that all events detailed in the documentation work for rewarded videos? We’re not seeing any events when we cancel the video using the cancel option admob provides.
@rich.stupek
AdMob doesn’t send a specific event for when a rewarded video is cancelled.
The only difference is that no ‘reward’ phase will be sent.
ugh ok that makes it hacky!
Unfortunately there’s nothing we can do about it as this is how the AdMob SDK works internally.
You’ll need to take it up with AdMob directly if you’d like to see different behavior.
Sorry if I made it seem I was blaming you as I wasn’t