bdlukaa / native_admob_flutter

Easy-to-make native ads in flutter using AdMOB SDK.
https://pub.dev/packages/native_admob_flutter
BSD 3-Clause "New" or "Revised" License
81 stars 57 forks source link

Set GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers #55

Closed zenkog closed 3 years ago

zenkog commented 3 years ago

My Test Device used to be able to get test Rewarded Video Ads. Somehow it doesn't get videos anymore and I get this message in the debug console:

<Google> To get test ads on this device, set: GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"f7677048c4ba4767c7ecbb442cabbfc70" ];
WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
WF: _WebFilterIsActive returning: NO
flutter: Error Rewarded Video Ad failed to load: #-1: Timeout achieved
flutter: Error Rewarded Video Ad failed to load: #1: Request Error: No ad to show.

How do I set the test device according to this message?

I have tried to add the List of test devices IDFA by doing:

MobileAds.setTestDeviceIds(AdsManager.devicesList);

But this still doesn't work.

flutter doctor -v ``` [✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.2 20D80 darwin-x64, locale en-US) • Flutter version 2.0.5 at /Users/ME/development/flutter • Framework revision adc687823a (3 weeks ago), 2021-04-16 09:40:20 -0700 • Engine revision b09f014e96 • Dart version 2.12.3 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Volumes/ME/Applications/Android/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Volumes/ME/Applications/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • 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 11.0.8+10-b944.6916264) [✓] VS Code (version 1.56.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.8.0 [✓] Connected device (2 available) • iPho (mobile) • bcccbe93864b12b2d3422cdbaecf25da9ac75d28 • ios • iOS 14.4.2 • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93 • No issues found! ```
zenkog commented 3 years ago

Sorry My bad. I got it working now. My mistake was because I used UDID for the devices List. Instead I should've used the ID mentioned in the Debug console. in my case it is f7677048c4ba4767c7ecbb442cabbfc70