I'm having a hard time with AdMob.
I have an app with eleven (11) activities. I successfully created the test banner ad but I can't see the real ads. Do I have to create 11 adunits or is there a way to create a single banner that overrides the activities somehow? What is the best way?
(Users will stay in each activity for est. 5 seconds.. I don't know how useful is to have 11 different banners)
Any ideas?
Also, I would be happy, if someone give me a step by step guide for AdMob (from android studio to publish)
In all xml files:
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
ads:adSize="BANNER"
ads:adUnitId="@string/admob_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
Here is what I added to build.gradle:
compile 'com.google.android.gms:play-services-ads:9.0.2'
And in all activities:
AdView adView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);