Witam, posiadam aplikację w której mam 3 różne typy reklam: mały banner, banner pełnoekranowy oraz reklamę video z nagrodą.
Problem jest taki, że na emulatorze oraz gdy aplikację zainstaluje bezpośrednio na swoim telefonie reklamy się wyświetlają ale gdy pobiorę apkę ze sklepu PLAY reklam już nie ma.
Naczytałem w necie chyba każdy artykuł na ten temat.. Jedni piszą, że nowo opublikowana aplikacja musi odczekać kilka dni aż zaczną działać reklamy inni natomiast piszą, że to może być problem z źle podanymi PADDINGAMI oraz MARGINESAMI w pliku xml.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:clipChildren="false">
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/topnew"
android:clipChildren="false"
android:paddingTop="47dp"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/playerBlocks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="xxx BLOKÓW"
android:textAlignment="center"
android:textSize="30sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:layout_below="@+id/playerBlocks">
<TextView
android:id="@+id/textViewLevel"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="Poziom 1" />
<ProgressBar
android:layout_marginTop="2dp"
android:id="@+id/levelBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:indeterminate="false"
android:max="100"
android:minWidth="200dp"
android:progress="100" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/playerBlocks"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="30dp"
android:clipChildren="false">
<TextView
android:id="@+id/blockPerSeconds"
android:layout_width="158dp"
android:layout_height="51dp"
android:layout_alignParentStart="true"
android:layout_marginLeft="35dp"
android:background="@drawable/clock"
android:gravity="right|center"
android:paddingBottom="5dp"
android:paddingRight="10dp"
android:text="1421679 b/s"
android:textSize="12dp" />
<TextView
android:id="@+id/playersDiamond"
android:layout_width="120dp"
android:layout_height="51dp"
android:layout_alignParentEnd="true"
android:layout_marginRight="25dp"
android:background="@drawable/coin"
android:gravity="center"
android:paddingBottom="5dp"
android:paddingLeft="17dp"
android:text="Nie jesteś \n zalogowany"
android:textAlignment="center"
android:textSize="9dp" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/coinsTakeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false">
</RelativeLayout>
<RelativeLayout
android:id="@+id/plusTextViewSpace"
android:layout_width="280dp"
android:layout_height="280dp"
android:layout_marginTop="100dp"
android:clipChildren="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:soundEffectsEnabled="false"
android:id="@+id/clickButton"
android:layout_width="280dp"
android:layout_height="280dp"
android:layout_centerInParent="true"
android:padding="70dp"
android:src="@drawable/block"
android:clickable="true" />
</RelativeLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:scaleType="fitEnd"
android:src="@drawable/fotter"
app:layout_constraintBottom_toBottomOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
app:layout_constraintBottom_toTopOf="@id/adView">
<Button
android:soundEffectsEnabled="false"
android:id="@+id/buttonItemShop"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/itemshop" />
<Button
android:soundEffectsEnabled="false"
android:id="@+id/buttonUpgrade"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="@drawable/upgrades" />
<Button
android:id="@+id/buttonOpenShop"
android:soundEffectsEnabled="false"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/shop" />
</LinearLayout>
<com.google.android.gms.ads.AdView
ads:layout_constraintBottom_toBottomOf="parent"
ads:layout_constraintLeft_toLeftOf="parent"
ads:layout_constraintRight_toRightOf="parent"
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="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3713322008461460/8400720730">
<!--ads:adUnitId="ca-app-pub-3940256099942544/6300978111">-->
</com.google.android.gms.ads.AdView>
<Button
android:soundEffectsEnabled="false"
android:id="@+id/buttonSettings"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/settings" />
<TextView
android:soundEffectsEnabled="false"
android:id="@+id/textViewTimeToReset"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:text="..."
android:clickable="true"
app:layout_constraintRight_toLeftOf="@id/buttonSettings"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/reset"
android:gravity="center"
android:paddingBottom="5dp"
android:paddingLeft="40dp"
android:textAlignment="center"
android:textSize="8dp" />
<TextView
android:soundEffectsEnabled="false"
android:id="@+id/textViewRanking"
android:layout_width="130dp"
android:layout_height="36dp"
android:layout_marginTop="2dp"
android:text="Sprawdź ranking!"
android:clickable="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/rank"
android:gravity="center"
android:paddingTop="5dp"
android:paddingLeft="26dp"
android:layout_marginLeft="10dp"
android:paddingBottom="5dp"
android:textAlignment="center"
android:textSize="10dp" />
</android.support.constraint.ConstraintLayout>
private AdView mAdView;
// GOOGLE ADS
MobileAds.initialize(this, "ca-app-pub-3xxxxxxxxxxx72xxxxxx30");
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);