question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android]App update gets rejected for Ad Fraud

See original GitHub issue

Plugin Version

1.1.0

Steps to Reproduce

  1. Run flutter build appbundle.
  2. Upload to google play and submit for review

Expected results: Normal review process

Actual results: Issue found: Ad Fraud We have determined your app contains code to facilitate Ad Fraud.

We found an issue in the following area(s):

SPLIT_BUNDLE 11

I was using another package for several months, that has now been deprecated. I am using my ads the same way i always have been.

class AdmobService implements IAds {
  final request = AdRequest(keywords: ['gaming']);

  late BannerAd bannerAd = BannerAd(
    size: AdSize.banner,
    adUnitId: getBannerAdID(),
    listener: BannerAdListener(),
    request: request,
  );

  InterstitialAd? interstitialAd;

  String getBannerAdID() {
    if (kDebugMode) {
      return Platform.isAndroid ? testBannerAndroid : testBannerIOS;
    }
    return Platform.isAndroid ? bannerAdAndroid : bannerAdIOS;
  }

  String getIntersitialAdID() {
    if (kDebugMode) {
      return Platform.isAndroid ? testInterstitialAndroid : testInterstitialIOS;
    }
    return Platform.isAndroid ? interstitialAdAndroid : interstitialAdIOS;
  }

  @override
  disposeBanner() {
    bannerAd.dispose();
  }

  @override
  init() async {
    bannerAd.load();
    await loadInterstitial();
  }

  @override
  Widget getBanner() {
    return Container(
      height: 50,
      color: StyleColors.canvasColor,
      child: AdWidget(ad: bannerAd),
    );
  }

  @override
  showInterstitial() async {
    if (interstitialAd == null) {
      await loadInterstitial();
      interstitialAd!.show();
    } else {
      interstitialAd!.show();
    }
  }

  loadInterstitial() async {
    await InterstitialAd.load(
      adUnitId: getIntersitialAdID(),
      request: request,
      adLoadCallback: InterstitialAdLoadCallback(
        onAdLoaded: (InterstitialAd ad) {
          // Keep a reference to the ad so you can show it later.
          this.interstitialAd = ad;
          interstitialAd!.fullScreenContentCallback = FullScreenContentCallback(
            onAdShowedFullScreenContent: (InterstitialAd ad) =>
                print('%ad onAdShowedFullScreenContent.'),
            onAdDismissedFullScreenContent: (InterstitialAd ad) {
              print('$ad onAdDismissedFullScreenContent.');
              ad.dispose();
              interstitialAd = null;
            },
            onAdFailedToShowFullScreenContent:
                (InterstitialAd ad, AdError error) {
              print('$ad onAdFailedToShowFullScreenContent: $error');
              ad.dispose();
            },
            onAdImpression: (InterstitialAd ad) =>
                print('$ad impression occurred.'),
          );
        },
        onAdFailedToLoad: (LoadAdError error) {
          print('InterstitialAd failed to load: $error');
        },
      ),
    );
  }
}
 if (controller.initialized)
                  Obx(() => (!controller.hasBoughtRemoveAds.value)
                      ? controller.adsService!.getBanner()
                      : Container()),
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.2.1 21D62 darwin-arm, locale en-US)
    • Flutter version 2.10.4 at /Users/colbymaloy/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (4 days ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/colbymaloy/Library/Android/sdk
    • Platform android-31, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.65.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.83

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
alihassan143commented, Mar 29, 2022

i dont think its the package issue because many of my apps have this package and non of them get rejected by apple or google

0reactions
laitooocommented, Oct 11, 2022

Hey, I already did that. I don’t really get what’s the problem yet. That’s why i asked for a screenshot or a video capture at least if possible.

I use applifecycle to dispose the ad when it’s in background and also i don’t load or show any ad if the app is not in foreground.

On Mon, Apr 11, 2022, 19:29 WildForkColbyM @.***> wrote:

ok, @laitooo https://github.com/laitooo so perhaps we need to attach some logic to listen to the flutter lifecycle state and somehow dispose the ads if app is in background?

— Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-mobile-flutter/issues/540#issuecomment-1095333644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBOYG4XJIJEXYVY3RA4JN3VERORFANCNFSM5R3Z43HA . You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google rejects my app and claims ad fraud - Stack Overflow
I recently faced this issue. But got my app update approved after the following update: We were having Interstitial ad right while opening ......
Read more >
Google rejects my app and claims ad fraud
I am using interstitial ads from Admob in my app. Google rejects my app and claims ad fraud. They say that my app...
Read more >
We have determined your app contains code to facilitate ...
App update rejected : We have determined your app contains code to facilitate disruptive ads. Hi Devs! I appeal to write here because...
Read more >
Ad Fraud - Play Console Help
Ad fraud is strictly prohibited. Ad interactions generated for the purpose of tricking an ad network into believing traffic is from authentic user...
Read more >
Android Question [SOLVED] Ad Fraud?? I need an Advice - B4X
I then switched to FirebaseAdmob2 after it was released, When I implemented it, they accepted that update briefly and later removed the app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found