Implementing Firebase AdMob banner ads on Android/iOS
They come in different sizes, can be put in different places, and they are really easy to be implemented. AdMob Banners offer that and more; let's see how we can add AdMob banner Ads to Android/iOS applications.
Getting ready
Please follow the instructions mentioned previously, on how you can download/configure your project with Firebase AdMob on your respective platform.
How to do it...
Let us first discover how Firebase AdMob banner ads are implemented in Android.
Over Android the process is divided into two parts:
- First part is where the ad will be located at
- Second is the banner configuration behind it with the respectable AdMob special ID
- Let's start with the ad location in our UI by simply implementing the following code:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal...