App suspended because Ad Policy using just AdMob

Guys,

I got an App suspended because.

“Interstitial ads may only be displayed inside of the app they came with. A prominent and accessible target must be made available to users in any interstitial ad so they may dismiss the ad without penalty or inadvertent click-through.”

I’m using AdMob Interstitial as a Exit Ad, in this app I’m just using them, that’s scary, it’s not allowed? the Interstitial always is shown in the same game context, wtf guys? Anyone with the same problem?

Rgs

Well, I suppose it answers our long question if exit ads are safe, apparently they aren’t. I will have to remove AppBrain and try to make up for its revenue some other way…
Sorry you were banned because of it. Maybe in your case the ad was showing too late?

Some people have slow Internet or slow phones. Once they close your app, your ad starts loading. This could take seconds or minutes on some users slow Internet or phones. Once the ad loads it opens. This could be seconds or minutes after the user had closed your app.

This is most likely the case for you. What you must do is, load the exit ads in onCreate() and on exit check if the ad has not loaded then just exit the app. Otherwise If the ad has loaded then show it and add an ad listener to your ad which listens for when an ad has closed, failed to load, or the user clicked the ad and left the application. If any of these events fire, then exit your app.

It’s too late now but this is for future reference

how did google know it was the ads too late to display?

yeah, you must put this
// Create the interstitial.
interstitial = new InterstitialAd(this);
interstitial.setAdUnitId(MY_AD_UNIT_ID);

// Create ad request.
AdRequest adRequest = new AdRequest.Builder().build();

// Begin loading your interstitial.
interstitial.loadAd(adRequest);

in your onCreate, and when you press back button or just the button witch exits your app you call this

if (interstitial.isLoaded()) {
interstitial.show();
}

that way, if there is an ad loaded already you will show it. in your way i guess you start sending request when you exits your app, and that’s why your app is banned. i use this and i have no problem for now… :slight_smile:

…I wonder if admob is reporting it remotely when you open an interstitial without having your activity running (anymore) … could be possible

Could be something covert like @reiti.net suggested, or a user could have reported it.

In any case, always assume that Google will find out if anything is out of place.

that’s what I have.

I have sent an appeal, so let’s see

use this code and check every time before showing an ad:

if (interstitial.isLoaded() && isAppOnForeground(getApplicationContext()) {
interstitial.show();
}

private boolean isAppOnForeground(Context context)
{
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
if (appProcesses == null)
{
return false;
}
final String packageName = context.getPackageName();
for (RunningAppProcessInfo appProcess : appProcesses)
{
if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND
&& appProcess.processName.equals(packageName))
{
return true;
}
}
return false;
}

Not sure if this would be relevant or not, but I don’t exit my activity until the exit interstitial is dismissed. I have similar code to that posted above to load the interstitial during onCreate. When a user presses back or exit, I check if the ad is loaded. If not, I exit the activity. If the ad is loaded, I display it. I then exit the activity when the interstitial is dismissed by calling activity.exit() from AdListener.onAdClosed().

I think this means that the ad will always be displayed inside the app, because the app isn’t finally closed until the ad is dismissed.

Whenever you exit application your adView or referral id link is destroyed. Most likely the user clicked on the ad. Since there’s no referral link hence Google can track it easily.

I would suggest to use a dialog with “Do you want to exit?” with (“exit”, “close”) buttons. Show the ad, as I described above and call the dialog at the same time. Override onBackPressed and show the ad and dialog at the same time (ad will be on the top), so when the user closes the ad, he will see the dialog, and will choose what to do.

You can use the code tags on the forums to make the code look neater.

if (interstitial.isLoaded() && isAppOnForeground(getApplicationContext()) {
interstitial.show();
}

private boolean isAppOnForeground(Context context)
	{
		ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
		List<RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
		if (appProcesses == null)
		{
			return false;
		}
		final String packageName = context.getPackageName();
		for (RunningAppProcessInfo appProcess : appProcesses)
		{
			if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND
					&& appProcess.processName.equals(packageName))
			{
				return true;
			}
		}
		return false;