Google rejects my app and claims ad fraud

613 views
Skip to first unread message

alexander...@gmail.com

unread,
Feb 12, 2021, 11:53:48 AM2/12/21
to Google Mobile Ads SDK Developers
I am using interstitial ads from Admob in my app. Google rejects my app and claims ad fraud. They say that my app displays an ad after exiting the app. I have changed my ad code to be sure that ad loading and ad displaying only happens when the activity is running and the app is in the foreground. Still they reject my app and claim ad fraud. I am just doing basic interstitial code here:

implementation 'com.google.android.gms:play-services-ads:19.7.0'


public class AdManager {

    boolean activityStarted;


    public void onStart() {

        activityStarted=true;

    }


    public void onStop() {

        activityStarted=false;

    }


    public void initializeAds(Context context) {

        MobileAds.initialize(context);

        MobileAds.setAppMuted(true);

        List<String> testDeviceIds = Arrays.asList("some id");

        RequestConfiguration configuration =

                new RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build();

        MobileAds.setRequestConfiguration(configuration);

    }


    public InterstitialAd getInterstialAdWithUnit(Context context) {

        InterstitialAd mInterstitialAd = new InterstitialAd(context);

        mInterstitialAd.setAdUnitId(BuildConfig.INTERSTITIAL_AD_UNIT_ID);

        setAdListener(mInterstitialAd);

        checkNewAdNeeded(mInterstitialAd);

        return mInterstitialAd;

    }


    public void setAdListener(InterstitialAd mInterstitialAd) {

        mInterstitialAd.setAdListener(new AdListener() {

            @Override

            public void onAdClosed() {

                super.onAdClosed();

                checkNewAdNeeded(mInterstitialAd);

            }

        });

    }


    public void showAdIfNeeded(InterstitialAd mInterstitialAd) {

        if (activityStarted && mInterstitialAd.isLoaded())

            mInterstitialAd.show();

        else {

            checkNewAdNeeded(mInterstitialAd);

        }

    }



    public void requestNewInterstitial(InterstitialAd mInterstitialAd) {

        AdRequest adRequest = new AdRequest.Builder()

                .build();

                

        mInterstitialAd.loadAd(adRequest);

    }


    public void checkNewAdNeeded(InterstitialAd mInterstitialAd) {

        //do not load ad when acticity is stopped

        if (activityStarted && !mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded())

            requestNewInterstitial(mInterstitialAd);

    }

}



public class FullscreenActivity extends AppCompatActivity {

    AdManager adManager=new AdManager();


    public void onButtonClicked() {

        //call another activity when Button is clicked and wait for return to display ad

        activity.startActivityForResult(intent, requestCode);

        runOnUiThread(new Runnable() {

            @Override

            public void run() {

                adManager.checkNewAdNeeded(mInterstitialAd);

            }

        });

    }


    @Override

    public void onActivityResult(int requestCode, int resultCode, Intent data) {

        super.onActivityResult(requestCode, resultCode, data);

        //back from other activity, try to display ads only if app has focus

        if ( from activity xy) {

            if (mHasFocus)

                showAdWhileHasFocus();

            else

                showAdWhenHasFocus=true;

        }

    }


    @Override

    protected void onStart() {

        super.onStart();

        adManager.onStart();

    }


    @Override

    protected void onStop() {

        adManager.onStop();

        super.onStop();

    }


    boolean showAdWhenHasFocus;



    public void showAdWhileHasFocus() {

        showAdWhenHasFocus=false;

        adManager.showAdIfNeeded(mInterstitialAd,promotionAndAdsEvent);

    }



   boolean mHasFocus=false;


    @Override

    public void onWindowFocusChanged(boolean hasFocus) {

        if (!hasFocus) {

        } else {

            if (showAdWhenHasFocus)

                showAdWhileHasFocus();

        }

        super.onWindowFocusChanged(hasFocus);

    }


    @Override

    protected void onDestroy() {

        super.onDestroy();

    }  

}


Mobile Ads SDK Forum Advisor Prod

unread,
Feb 12, 2021, 12:35:51 PM2/12/21
to alexander...@gmail.com, google-adm...@googlegroups.com
Hi Alexander,

Thank you for bringing this issue to our attention. While we help to handle the implementation of the SDK , it would seem that you have it properly loaded. As for the issue with the policy? That we would recommend that you contact the people who sent you the rejection email. As they can better help you with that.

The question I would ask them is "How can I request an ad after the app is exited?" to our knowledge that shouldn't even be possible. I would also suggest just checking out out sampke app here .

You can also send us a copy or sample of the app to run here and see if we find anything.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CQRJk:ref

alexander...@gmail.com

unread,
Feb 13, 2021, 4:23:58 AM2/13/21
to Google Mobile Ads SDK Developers
Hello,
the problem is, app developer support is not providing any proof or additional information about the issue. They just continue to reject it with a general message about ad fraud. There is no progress in solving the issue and I am afraid that if I get too many rejections then maybe they ban my app or my account.

My other apps share the same code base and I got the same rejection for them in the past but after an appeal they all have been accepted. And one app even was a Pro version where the ads were never called. This lets me think that they are using some code analysis which triggers wrong.

I am using Admob for almost 10 years now with some really successful apps like Gentle Wakeup with over 500 000 downloads https://play.google.com/store/apps/details?id=com.changemystyle.gentlewakeup. If I can not update my apps than I am forced to quit Admob Ads. This can not be of googles interest. I really feel left alone here with this issue. I am willing to cooperate in any way to solve this. Can you escalate this with app developer team?

Alex

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 15, 2021, 1:26:57 AM2/15/21
to alexander...@gmail.com, google-adm...@googlegroups.com

Hi Alex,

Kindly note that policy-related concerns are out of scope for our level of assistance in this forum, and we do not have direct contact with the policy team responsible for checking policies for Play Store apps. You may refer to this page to learn more about ad fraud, and then reach out to either the Play Console support team (via their contact form), or to the product specialists at the AdMob Help Center, for further assistance on this.
 

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CQRJk:ref

ksmob

unread,
Feb 16, 2021, 3:41:46 PM2/16/21
to Google Mobile Ads SDK Developers
Alex,

I would suggest to use a static global variable    is_app_running .

you will set it true in  onStart  of every activity in your app 

you will set it FALSE in  onStop  of every activity in your app 

Here, you are using different variables for each activity. This is causing this bug. 

Regards.

alexander...@gmail.com

unread,
Mar 16, 2021, 3:47:41 AM3/16/21
to Google Mobile Ads SDK Developers
Good news: My apps are passing now the review of Google Play Store.

I noticed that my InterstitialAd class in Android appears as deprecated. I was using the package com.google.android.gms.ads.InterstitialAd but AdMob restructured Interstitial interface and created a new class com.google.android.gms.ads.interstitial.InterstitialAd. After implementing the new interface my apps pass Google Play.

I have to final points about this issue:
  1. You always write that you are not responsible for Google Policy issues. But you could have noticed that my code is still about the old interface and suggest to try out the new one. This would have saved me 5 months of figuring this out or at least from the time I posted this message.
  2. You should clarify this with Google Play. Any developer who is still using the old class may experience app rejections claiming ad fraud.

Alex  

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 16, 2021, 6:05:45 AM3/16/21
to alexander...@gmail.com, google-adm...@googlegroups.com

Hi Alex,

I’m with Ziv’s team and I’m glad that your app is now passing the review of Google Play Store.

Thank you also for sharing your thoughts about your concern. I reviewed your previous email and you’ve mentioned that you updated your code implementing the SDK version 19.7.0 with legacy API for interstitial ad (package com.google.android.gms.ads.InterstitialAd).

However, did you ever encounter any issues during your implementation with the said API? I’m asking because the legacy API for the interstitial ad was released prior to the SDK version 19.7.0. So basically, you shouldn’t have been able to use this API in building your app in the first place as you may encounter issues during the process.


Regards,


Google Logo
Sherwin Diesta
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CQRJk:ref

alexander...@gmail.com

unread,
Mar 16, 2021, 6:36:57 AM3/16/21
to Google Mobile Ads SDK Developers
Hi,
the first time Play Store rejected my apps was in Nov 2020 with implementation 'com.google.android.gms:play-services-ads:19.4.0' and API package com.google.android.gms.ads.InterstitialAd. It was for the paid version of my app which - because of shared code with free app - initialized the MobileAds and set an AD Unit for Interstitial but never requested or showed ads, very funny.

Then I got regular rejections for my apps while climbing from 19.4.0 to to 19.7.0 for the lib and still using com.google.android.gms.ads.InterstitialAd. After requesting an appeal and a long review period the appeal was accepted but the next app was rejected again. This continued until March 2021. I never got compilation issues and ads showed properly for the free versions.

Just a few days ago I noticed in Android Studio that the class InterstitialAd was strikedthrough. I read about the new package com.google.android.gms.ads.interstitial.InterstitialAd, adapted my code to the interface changes and my apps are passing the review now without a problem.

Alex

Hamid Alaei

unread,
Mar 16, 2021, 6:40:27 AM3/16/21
to Google Mobile Ads SDK Developers
Thanks Alexander for bringing your good news here. If you are right that using deprecated classes can cause Google to mark your app as ad fraud, this is a terrible support then. We are using the same deprecated class that you mentioned and ad mob "introduced ad serving limit" to our app today. I am not sure what is the cause of my issue. I hope someone from Google can confirm one of the following:
1. It was a mistake from Google side which will be fixed soon.
2. The app being marked as as fraud or introducing ad serving limit to an app has nothing to do with using deprecated code.

alexander...@gmail.com

unread,
Mar 16, 2021, 6:45:01 AM3/16/21
to Google Mobile Ads SDK Developers
Please note that I had no policy issue with Admob, only with Google Play. So not sure if your issue is also related to deprecated code...

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 16, 2021, 10:49:13 AM3/16/21
to alexander...@gmail.com, google-adm...@googlegroups.com
Hi Alexander,

Thank you for bringing this issue to our attention. Just want to start by letting you know that this forum is to help people setup the SDK in there app for ad serving.We are unable to handle issues with "Fraud" claims from Google Play or any policy issues. For this we would suggest that you reach out to our Product Support Team. As they have the ability to look at your account. And can look more into why your account was flagged or ad limit applied.

Also we would suggest thta you reply back to the email that you received that mentioned the constant rejection. Also, know that as of now Interstitial Ads have been changed and that is why you are having the issue with that. We suggest looking at this link . Also as you will see in that link, 19.7.0 of the SDK has many API changes.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CQRJk:ref

alexander...@gmail.com

unread,
May 13, 2022, 2:52:11 AM5/13/22
to Google Mobile Ads SDK Developers
Well, as I mentioned in my last post, the "Fraud" claim from Google Play were raised because of your legacy interstitial API and I never got a "Fraud" claim again after switching to the new interstitial API. Google Play would never habe been able to help me by looking into my account, it was code in the AdMob SDK. But anyway, the issue is solved and you can close this issue if you want. 

Mobile Ads SDK Forum Advisor

unread,
May 13, 2022, 10:15:16 AM5/13/22
to alexander...@gmail.com, google-adm...@googlegroups.com

Hi Alexander,

If you have any other concerns related to the implementation of Google Mobile Ads SDK, kindly provide us the details. We'll be happy to assist you.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CQRJk:ref

Mobile Ads SDK Forum Advisor

unread,
Jun 17, 2022, 6:07:36 PM6/17/22
to alexander...@gmail.com, google-adm...@googlegroups.com

Hi Alexander,

We can definitively say that implementing interstitials with the deprecated Interstitial classes vs. new classes had nothing to do with the ad fraud case. It is *how* the implementation is done that matters.

In your case, one of these two things must have happened:

1) When updating your app to implement the new Interstitial API, the way in which you presented interstitials changed in a way that's now compliant with Google Play and AdMob policies. Re-review of your app shown that you are now in compliance.
2) Your account was incorrectly flagged for fraud in the first place, and upon further review, the flag was lifted.

Either way, we're happy to hear that interstitials are now working for you. But for anybody else worried that deprecated APIs automatically trigger fraud behavior, this is simply not the case.

Thanks,
Eric, Mobile Ads SDK Team



ref:_00D1U1174p._5004Q2CQRJk:ref
Reply all
Reply to author
Forward
0 new messages