1

How to use the same AdMob banner instance across activities? I don't want the banner to load again and again if my user switches screens swiftly. I think it's lowering my CTR quite a bit.

Is there any way I can use the same AdMob banner 'instance' across different activities? I just want to stick the banner at the bottom (or top) of the screen and just use the rest of the screen for my app, moving in and out of activities while the banner stays put.

(Not to be too intrusive, my users can just turn off their internet and the ads won't appear. My app is completely offline)

Is there any way I can use the same AdMob banner 'instance' across different activities? I just want to stick the banner at the bottom (or top) of the screen and just use the rest of the screen for my app, moving in and out of activities while the banner stays put.

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27
  • One way to go as far as I know is, create a layout with a banner view and then create a container for the content you want to display. Then, change every activity of your application to fragments and use fragments in the container by applying a `FragmentTransaction` instead. – Furkan Yurdakul Jan 24 '19 at 12:17

2 Answers2

0

Banner Ads itself is a View. So you can use it as a View only

I just want to stick the banner at the bottom (or top) of the screen and just use the rest of the screen for my app, moving in and out of activities while the banner stays put.

For this using fragment can help and other way is including View in different activity layout. But you will have to manage in all activities.

Simply it needs to be treated like a View as we use other.

Vir Rajpurohit
  • 1,869
  • 1
  • 10
  • 23
0

On way is to use one Activity and then Fragments. Instead of moving from one Activity to the other, you will be attaching and detaching Fragments at the click of items. So your Banner Ad view will sit at the top or bottom of the Fragment View.

Check this old example on working with Fragments, it will help you

Gordons
  • 324
  • 5
  • 17