I have several activitys and I charge different banners with different ids.
Is it possible to upload the same id in all the banners?
What you comment is what is regularly done, define a unitId
of an ad in ads that you define in your application, in which you only change the measure. Define the ads:adUnitId
and define its measure using ads:adSize
You can define the measure BANNER
:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
and in another part of your application add another ad with another measure, such as MEDIUM_RECTANGLE
:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
ads:adSize="MEDIUM_RECTANGLE"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
Both ads use the same unitId and according to the measure you define, a different aspect advertisement will be displayed.