Android Question FirebaseAdmob - Banner Ad Events?

tufanv

Expert
Licensed User
Hello,

FailedToReceiveAd (ErrorCode As String) and ReceiveAd is not working for my banner ads in firebase Admob but for interstitials they are working. Am I using the wrong event for banners or they are not supported ? If they are not supported how can I understand if the load is received or not ?

Thanks
 

tufanv

Expert
Licensed User
I found something strange I use builder to build ads:

bannerpremium.LoadAdWithBuilder(builder)
iadpremium.LoadAdWithBuilder(builder)

When I disable the interstitial ad (second line) banner ad event is working when I load both ads it is not working. What am I doing wrong ?
 

sorex

Expert
Licensed User
do you mean you use the same eventname for both?

I give them their own eventname in the init line as they have different event types (interstitial & rewarded video for sure)
altho I'm not sure if that is a/the reason for your fail/conflict.
 

tufanv

Expert
Licensed User
do you mean you use the same eventname for both?

I give them their own eventname in the init line as they have different event types (interstitial & rewarded video for sure)
altho I'm not sure if that is a/the reason for your fail/conflict.
No I dont use the same event name. When I have both those lines under loadad sub , the events of bannerad is not working but if i comment out the insterstitial ad ( iadpremium.LoadAdWithBuilder(builder)) events of banner ad are working. Maybe showing the interstatial ad blocks the events of banner ad ?
 

sorex

Expert
Licensed User
you need to use the consent stuff if the user is in the EU so you need to use .loadAdWithBuilder.

tuf: try to use a seperate builder for the banners maybe that works.
 

tufanv

Expert
Licensed User
I will try this. Seems reasonable :)
you need to use the consent stuff if the user is in the EU so you need to use .loadAdWithBuilder.

tuf: try to use a seperate builder for the banners maybe that works.
 

tufanv

Expert
Licensed User
No, Building with diferent builder arent also working. If the interstitial ad is shown before the bannerad's event triggered, the events are not showing, If I comment out iad.show ( interstitial ad ) events working correctly. I think showing the interstitial ad blocks the events of banner ad. isn't this a bug ?
 
Last edited:

tufanv

Expert
Licensed User
I'm unable to reproduce it.
The ReceiveAd event of both ads is raised.
For me, if the iad is shown before the banner ad's event is triggered, it is never triggered again. Did you try showing the interstitial ad?
 

tufanv

Expert
Licensed User
No. The ReceiveAd is raised before you show the ad.
I mean this: If the interstitial ad is shown before the banner ad's event is raised, the event is not raising. I have IAd.show under iad_ready so as soon as the iad received , iad shows, in this case banner ad's event is not raising here. If I comment out iad.show under iad_ready , this time banner ad's event raises.
 

sorex

Expert
Licensed User
I noticed before that some things are pushed to a queue when the interstitial kicks but that is mentioned in the log.

but in your case you better preload the interstitial and display as needed. doing it with the load'n ready event causes delays and will lead to accidental clicks.
 

tufanv

Expert
Licensed User
I guess that the activity is paused at that point so some events are missing (it depends on the way the event is implemented).
Yes when the ad shows ( interstitial) , activity is paused, and if until this happened bannerad is not ready, events are missing. so what should I do to avoid this other than keeping the ad to show before the banner ad's event is raised
 

tufanv

Expert
Licensed User
Thank you very much. You mean with the release of stable version of 9.00 right ?

The next version of FirebaseAdMob (1.54), to be included with B4A v9.00, will handle the events in a slightly different way and they will be raised when the activity is resumed.
 

sorex

Expert
Licensed User
I my case I had to reorder things from

call updateScores
call interstitialshow

to

call and wait for updateScores response
call interstitialshow from inside wait for block

otherwise the leaderboard display updating didn't work as the (back then) jobdone event never occured.

it causes a slight delay (1 second) for the interstitial to show up due to the waiting for the http response but it's still acceptable.

it worked fine before tho but I'm not sure since when this weirdness occured (B4A version or some lib update).

I'll do the testing again when the new version comes out.
 
Top