What is Admob policy for Interstitial ads 2019 ?


Interstitial Ads:When you are placeing Interstitial Ads you must be careful about that --

1.It should not come before loading the app .
2.It should not come before loading new activity.
3.It should be added every button on your app.
4.If you are using circular ad request (Ads comes every n seconds) .Then you must maintan 60 to 80 seconds gap bitween two ads come.


How to place Interestitial ads 2019?

Step=>1It Interestitial ad so no dealing with xml file we shall be dealing with the java code only
Go to Main Activity.java
public class MainActivity extends AppCompatActivity {
private InterstitialAd mInterstitialAd;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

MobileAds.initialize(this,"ca-app-pub-3940256099942544~3347511713");
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-3940256099942544/1033173712");
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
}


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


How set Interestitial ad in every N time ?

public class MainActivity extends AppCompatActivity {
private InterstitialAd interstitialAd ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
preparedAd();
ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
scheduler.scheduleAtFixedRate(new Runnable() {
public void run() {
runOnUiThread(new Runnable() {
public void run() {
if (interstitialAd.isLoaded()) {
interstitialAd.show();
}
preparedAd();
}
});
}
}, 15, 60, TimeUnit.SECONDS);
}
public class myWebClient extends WebViewClient{
@Override
public void onPageStarted(WebView view , String url , Bitmap favicon){
super.onPageStarted( view,url,favicon);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view,String url){
view.loadUrl(url);
return true;
}
}
public void preparedAd(){
interstitialAd = new InterstitialAd(this);
interstitialAd.setAdUnitId("ca-app-pub-9136564254270725/2520149185");
interstitialAd.loadAd(new AdRequest.Builder().build());
}
}

Requrements

Start Freelancing

ad