firebase / flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

πŸ› [firebase_admob] Debug version shows testAd, but release version shows a real Ad even on a test device #3638

Closed xl-hacker closed 3 years ago

xl-hacker commented 4 years ago

Bug report

  1. I have an approved admob account
  2. I have added my (Android) device ID to testDevices in MobileAdTargetingInfo.
  3. When I load the app in debug mode onto my Android device "flutter run -d ", it correctly shows a bannerAd tagged with "test Ad".
  4. When I load the app in release mode onto the same device "flutter run -d --release", it shows a regular banner ad without the "test Ad" annotation. The device is the same, the ID is included in testDevices, so not sure why that should happen.

This worries me because I want to test with this device in release mode if possible, but having a real ad there might cause issues with my admob account.

Flutter doctor on master channel below.

Flutter doctor

flutter doctor -v

[βœ“] Flutter (Channel master, 1.22.0-10.0.pre.36, on Mac OS X 10.15.6 19G73, locale en-US)
    β€’ Flutter version 1.22.0-10.0.pre.36 at <location>
    β€’ Framework revision bcfad2068e (3 weeks ago), 2020-09-01 08:34:25 -0400
    β€’ Engine revision 165abef0a2
    β€’ Dart version 2.10.0 (build 2.10.0-77.0.dev)

[βœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    β€’ Android SDK at <location>
    β€’ Platform android-29, build-tools 29.0.2
    β€’ ANDROID_HOME = <location>
    β€’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    β€’ All Android licenses accepted.

[βœ“] Xcode - develop for iOS and macOS (Xcode 11.6)
    β€’ Xcode at /Applications/Xcode.app/Contents/Developer
    β€’ Xcode 11.6, Build version 11E708
    β€’ CocoaPods version 1.9.3

[βœ“] Chrome - develop for the web
    β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[βœ“] Android Studio (version 3.5)
    β€’ Android Studio at /Applications/Android Studio.app/Contents
    β€’ Flutter plugin version 41.1.2
    β€’ Dart plugin version 191.8593
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[βœ“] VS Code (version 1.48.2)
    β€’ VS Code at /Applications/Visual Studio Code.app/Contents
    β€’ Flutter extension version 3.14.1

[βœ“] Connected device (5 available)
    β€’ SM A102U (mobile)                   β€’ RF8MC0NVQJE                          β€’ android-arm    β€’ Android 9 (API 28)
    β€’ Android SDK built for x86 (mobile)  β€’ emulator-5554                        β€’ android-x86    β€’ Android 8.0.0 (API 26) (emulator)
    β€’ iPhone SE (2nd generation) (mobile) β€’ 5A4B0C02-87C8-4DFC-806D-A3AACB93242F β€’ ios            β€’ com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
    β€’ Web Server (web)                    β€’ web-server                           β€’ web-javascript β€’ Flutter Tools
    β€’ Chrome (web)                        β€’ chrome                               β€’ web-javascript β€’ Google Chrome 85.0.4183.121

β€’ No issues found!
russellwheatley commented 3 years ago

The firebase_admob plugin will be deprecated in April 2021 in favor of Google Mobile Ads SDK for Flutter. Google Mobile Ads SDK for Flutter is a new Flutter plugin that supports more Ads formats than firebase_admob does. Google Mobile Ads SDK for Flutter currently supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded video ads across AdMob and AdManager. It also supports displaying banner and native ads as Widgets as opposed to being overlayed over all app content. We're now recommending projects currently using firebase_admob migrate to Google Mobile Ads SDK for Flutter following the instructions outlined here. Issues with migrating or with using the new package should now be raised over on the Google Mobile Ads SDK for Flutter repository.