Admob banner flickers at top of screen before showing at bottom

Hello,

I am leveraging the admob plugin in order to display a banner ad at the bottom of the screen. I am invoking admob.show( “banner”, { y = “bottom” } ) to display the ad.

However, when the ad flickers at the top of the screen for a brief amount of time (i.e. it appears at the top of the screen for less than a second) before it is displayed at the bottom.

It appears as though there is some asynchronous logic that runs to update the banner’s y position (and move it to the bottom in my case) after it is displayed.

I have followed implemented it using this documentation as a reference:

function scene:show( event )
    if event.phase == "did" then
          if admob.isLoaded( "banner" ) then
              admob.show( "banner", { y = "bottom" } )
          end
    end
end   

Does anyone know how to prevent this flicker from occurring, such that the ad appears at the bottom of the screen immediately? I have tested this on ios, but have not tested yet on android.

Taking a look at com.coronalabs-plugin.admob/src/ios/Plugin/AdMobPlugin.mm , I do see that an asynchronous process is being invoked:

//    [banner setFrame:bannerFrame];
		[library.coronaViewController.view addSubview:banner];
		
		NSString *align = nil;
		if (yAlign != NULL)
		{
			align = [NSString stringWithUTF8String:yAlign];
		}
		
		dispatch_async(dispatch_get_main_queue(), ^{
			[adInstance positionBannerViewInsideSafeArea:banner withYAlign:align withYOffset:yOffset];
		});

Yup, I also have this problem. I’ve been having it for years now and accepted it as normal.

It would be great if there was a fix for this.

1 Like

Yeah, I plan on logging an enhancement request for this. In the meantime I moved the banner to the top of the screen; it doesn’t get rid of the issue, but it isn’t as noticeable since the banner doesn’t move as far.

Did you ever manage find a fix for this flicker? Super annoying and makes the game feel cheaper.

I use AdMob banner ads at the bottom of the screen in my game on most scenes and I don’t think I have ever experienced this since launch 3 years ago. No player has complained about it either and I can not replicate on iOS or Andorid with various phones I use for testing.

Try calling admob.show( ) like how I do below.

bannerHeight = admob.height()
admob.show( "banner", {y = display.actualContentHeight - bannerHeight})

Hmm, I’ve always had this issue since day 1. You can see in the video it quickly flickers at the top before returning to the bottom.

I haven’t pursued a solution for this issue. I ended up moving my banner to the top of the screen so that it is less noticeable.