What is Admob policy for banner ads 2019 ?


Banner Ads:In privious days Banner ads was not fixed in a place so that we could placed any where in the display .But Now It holds a fixed possition in the phone screen .So you can not placed it here and there . It can be placed only top of the screen or bottom of the screen .



How to place banner ads 2019?

Step=>1Openr your project and go to the xml file that want to place ad an AdView on your layout .In the AdView tag paste the code.

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-3940256099942544/6300978111">

Always remember
xmlns:ads="http://schemas.android.com/apk/res-auto"
If this line of code is not present in Layout then add this in the layout.


Step=>2 Go to Mainfest.xml file and add between the aplication tag --
meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-9136564254270725~1130103949" />


Step=>3Go to Main Activity.java
public class MainActivity extends AppCompatActivity {
private AdView mAdView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
}
}


Then all codes are provided by @google .If want to me clear about this see the video given bellow


Requrements

Start Freelancing

ad