Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue: Violation of Interfering with Apps, Third-party Ads, or Device Functionality policy

i tried just to publish an update of my app in the Google Play Store, i didn't change anything in the code, just incremented the 'version Code' in gradle and published the app, but the app got rejected (3 times now) because of this policy violation:

Issue: Violation of Interfering with Apps, Third-party Ads, or Device Functionality policy

Ads associated with your app must not interfere with other apps, ads, or the operation of the device, including system or device buttons and ports. This includes overlays, companion functionality, and widgetized ad units. Ads must only be displayed within the app serving them.

Next steps:

1- Read through the Interfering with Apps, Third-party Ads, or Device Functionality policy and make appropriate changes to your app.

2- Be sure to remove any ads that appear after the user has exited the app, or after the user has pressed the back button to exit the app.

3- Make sure that your app is compliant with all other Developer Program Policies. Additional enforcement could occur if there are further policy violations.

Sign in to your Play Console and submit the update to your app.

i have asked the support for more informations about my app, why it get rejected, hence no ads are shown, when a user leave the app. but it's frustrating to get just the standard answer, as if we are talking just with robots.

here is the answer of the so called "Google Support":

... Thanks again for contacting Google Play team.

As much as I'd like to help, I’m not able to provide any more information or a better answer to your question. In our previous email, I made sure to include all the information available to me...

If you have a different question about the Play Developer Console, please let me know.

My App is a Quotes App. in the MainActivity there is a RecyclerView, where all the quotes are Listed, when a user click on a quote, it opens a viewPager-Activity where the user can see the quote and scrolle horizontally to see other quotes.

in the MainActivity there is a banner-Ad at the bottom of the screen. i count how many times a user click on a quote, if the counter goes to 5 i show an interstitial between MainActivity and the viewPager-Activity.

here is the code of the interstitial Ad in the mainActivity. maybe you guys can see, if my App really violate the Policy mentioned above.

protected void onCreate(...){

 //Interstitial
        mInterstitialAd = new InterstitialAd(this);
        mInterstitialAd.setAdUnitId(getString(R.string.ad_interstitial));
        mInterstitialAd.loadAd(new AdRequest.Builder().build());
        mInterstitialAd.setAdListener(new AdListener(){
            @Override
            public void onAdClosed() {
                mInterstitialAd.loadAd(new AdRequest.Builder().build());
            }

            @Override
            public void onAdFailedToLoad(int i) {
                mInterstitialAd.loadAd(new AdRequest.Builder().build());
            }
        });

...

}

and when a user click on a quotes, i use this code to show the interstitial ad

@Override
    public void onRecyclerViewItemClicked(int itemIndex) {
        if(imageClickedAdsCounter % 5 == 0) { // if it's the fifth time a quote is clicked
            showInterstitialAds();
        }
        ++imageClickedAdsCounter;
        Intent intent = new Intent(MainActivity.this, ImageViewPagerActivity.class);
        ...
        startActivity(intent);
    }

    private void showInterstitialAds(){
        if(mInterstitialAd != null && mInterstitialAd.isLoaded()) {
            mInterstitialAd.show();
        }
    }

i don't habe any implementation of the onBackPressed()method.

i'm really frustrated right now, first because the so called "google Support" doesn't help at all !!! and because i don't know what code should i change to be able to update the app. so any help will be really appreciated. thank you in advance

like image 765
korchix Avatar asked Jul 27 '19 16:07

korchix


1 Answers

I faced the same issue the problem was my ad was also showing when user minimize my app I solved the problem by checking if my app is in background

Add library in your build.gradle

implementation "android.arch.lifecycle:runtime:$arch_version"
implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"

Then when calling mInterstitial.show() check for if app is not in background

    if(ProcessLifecycleOwner.get().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
    
        mInterstitialAd.show();
    } else {
        Log.d("AppInBackground", "App Is In Background Ad Is Not Going To Show");
    }

For more information about arch_version and lifecycle_version versions to use check this link : https://developer.android.com/jetpack/androidx/releases/lifecycle

like image 86
Adil Raza Bangash Avatar answered Nov 09 '22 08:11

Adil Raza Bangash