admob questions ? position,, hide

Hi Team,

I was trying from long time to make ads work in my app for testing and finally succeeded with admob :slight_smile: :slight_smile:

i have just few question, 

  • how can I locate the banner for ads for example top , button or specific box as i saw in some apps

  • How can i control the height and width for the banner…

  • How can i make close box on the corner of the banner so user can hide the ads if he wishes to,

  • what is the diff between banner and interstitial ?

Regards

Abdulaziz

- how can I locate the banner for ads for example top , button or specific box as i saw in some apps

I think you can get now the height of the banner. Look at the admob docs or in another threads about admod

 

- How can i control the height and width for the banner…

You can’t. All banners have an automatic size. Look for other threads that about this.

 

- How can i make close box on the corner of the banner so user can hide the ads if he wishes to,

Create a button and calls the hide function

 

- what is the diff between banner and interstitial ?

banner = banner ads

interstitial = full screen ads

thanks Renato for the quick response…

I tried to make the button to hide the ads and it worked, but I am not able to locate it on top of the banner or exactly on the its corner… the banner always become over the button… normally i saw “x” image on the corner of the banner in many apps… i dont know how to it ?

can you help :

[lua]

ads.init( “admob”, appID, adListener )

ads.show( “banner”, { x=0, y=0, appId=appID } )

local closeAds 

local function hideAds( event )

  ads.hide( )

  closeAds.isVisible = false

  closeAds:removeEventListener( “tap”, hideAds )

end 

closeAds= display.newImage( “images/closeAds.png”,24,24 )

closeAds:addEventListener( “tap”, hideAds )

  

[/lua]

thx

Abdulaziz

That probably happens because the banner is loaded after you already displayed the close button, so the banner ends on top of it. You can try make the close button to be on top of everyone after the banner is loaded…

But, I think that banner ads wouldn’t suppose to have a close button.

thx sir,

so you mean in order to gain more click we should not hide the ads ? 

thx

Abdul

Yes. Banners are supposed to be shown at a specific screen and stay there.

thanks sir

- how can I locate the banner for ads for example top , button or specific box as i saw in some apps

I think you can get now the height of the banner. Look at the admob docs or in another threads about admod

 

- How can i control the height and width for the banner…

You can’t. All banners have an automatic size. Look for other threads that about this.

 

- How can i make close box on the corner of the banner so user can hide the ads if he wishes to,

Create a button and calls the hide function

 

- what is the diff between banner and interstitial ?

banner = banner ads

interstitial = full screen ads

thanks Renato for the quick response…

I tried to make the button to hide the ads and it worked, but I am not able to locate it on top of the banner or exactly on the its corner… the banner always become over the button… normally i saw “x” image on the corner of the banner in many apps… i dont know how to it ?

can you help :

[lua]

ads.init( “admob”, appID, adListener )

ads.show( “banner”, { x=0, y=0, appId=appID } )

local closeAds 

local function hideAds( event )

  ads.hide( )

  closeAds.isVisible = false

  closeAds:removeEventListener( “tap”, hideAds )

end 

closeAds= display.newImage( “images/closeAds.png”,24,24 )

closeAds:addEventListener( “tap”, hideAds )

  

[/lua]

thx

Abdulaziz

That probably happens because the banner is loaded after you already displayed the close button, so the banner ends on top of it. You can try make the close button to be on top of everyone after the banner is loaded…

But, I think that banner ads wouldn’t suppose to have a close button.

thx sir,

so you mean in order to gain more click we should not hide the ads ? 

thx

Abdul

Yes. Banners are supposed to be shown at a specific screen and stay there.

thanks sir