There is an activity in which in the onCreate method I display interstitial advertising. Everything was like a good app in the market for half a year. But a couple of hours ago, a letter came from Google that the type of interstitial advertising should not be shown while viewing content. What can this mean? Notifications are also created in activations, and if you click on the notification, the advertisement opens again and the interstitial advertisement appears again. Maybe it meant?

Here is the text of the letter

РАЗМЕЩЕНИЕ МЕЖСТРАНИЧНЫХ ОБЪЯВЛЕНИЙ, ПРОВОЦИРУЮЩЕЕ СЛУЧАЙНЫЕ КЛИКИ Издателям не разрешается создавать ситуации, в которых пользователи могут непреднамеренно нажать на межстраничные объявления AdMob. Межстраничные объявления не должны: загружаться, когда пользователь просматривает контент. 

In which place is it better to display interstitial advertising? In all onCreate methods, I display

 Intent PlayerIntent; private InterstitialAd adMob; public void displayAdMob() { if (adMob.isLoaded()) { adMob.show(); } } @Override protected void onResume() { super.onResume(); list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { PlayerIntent = new Intent(MainActivity.this, Player.class); PlayerIntent.putExtra("stream", stream); displayAdMob(); } }); adMob = new InterstitialAd(this); adMob.setAdUnitId("ID"); // Создаём запрос к AdMob AdRequest adRequesti = new AdRequest.Builder().build(); // Начинаем загружать объявление adMob.loadAd(adRequesti); adMob.setAdListener(new AdListener() { @Override public void onAdClosed() { startActivity(PlayerIntent); } }); } 
  • IMHO, this means that you can not mislead the user. Type to put a link to the cross, which allegedly closes advertising, etc. - Mikhail Alekseevich
  • I agree, but I have no such thing - Scorpion
  • Just an ad is displayed and that's it - Scorpion
  • There is open the activation and immediately press the home button, then interstitial ads pop up right on the desktop. Maybe a comment is related to this? If yes, then how to make the ad appear only then openly activate itself? Those. when the activation is straight on the screen - Scorpion

1 answer 1

Perhaps they interpreted it this way:

An Activity opened, it starts to show content and immediately pops up an advertisement - it means intentionally for making clicks.

Transfer from onCreate to where you are launching this Activity , i.e. show advertising first. And after the user closes it, in onAdClosed() , go to this Activity .


When clicked, replace with the ad display (first transfer its creation and upload to your MainActivity):

 list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { displayAdMob(); } }); 

And after closing go to the desired Activity:

 adMob.setAdListener(new AdListener() { ... @Override public void onAdClosed() { Intent intent = new Intent(MainActivity.this, Player.class); intent.putExtra("stream", stream); startActivity(intent); } }); 
  • This activity is launched from the MainActivity. So I need to add ad display in MainActivity? - Scorpion
  • Is there a simple example? - Scorpion
  • @Scorpion show how you run - VAndrJ
  • I added a code to the question. The first part of the code before the displayAdMob method in my onCreate method is Scorpion
  • @Scorpion I meant Activity, but not advertising - VAndrJ