Is it normal to not show anything indicating that I have implemented ads correctly in my application?

2

Obviously I do not expect any real ads to appear, but some indication that I've done the procedure correctly to find out if that's all right.

First image (Preview Android Studio)

2ndimage(Virtualmachineapplication)

Asshownnothingappears,soIhavenoidea.

ActivityXML

<com.google.android.gms.ads.AdViewandroid:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        ads:adSize="BANNER"
        ads:adUnitId="@string/banner_ad_unit"/>
    
asked by anonymous 14.08.2017 / 02:20

1 answer

1

Adding the following lines, I was able to resolve my question:

MainActivity

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

public class

private AdView adView01;
private AdRequest adRequest01;

onCreate

adView01=(AdView)findViewById(R.id.adView01);
adRequest01=new AdRequest.Builder().build();
adView01.loadAd(adRequest01);

    
24.08.2017 / 02:01