From c8374ce7e79672baf832c60593e51f2e52105c8a Mon Sep 17 00:00:00 2001 From: Justin Malandruccolo Date: Sun, 30 Jun 2024 21:42:45 -0400 Subject: [PATCH 1/2] Updated ad id for banner sample --- packages/google_mobile_ads/example/android/app/build.gradle | 4 ++-- .../example/lib/inline_adaptive_example.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google_mobile_ads/example/android/app/build.gradle b/packages/google_mobile_ads/example/android/app/build.gradle index 55a3b0117..fc0e073d4 100644 --- a/packages/google_mobile_ads/example/android/app/build.gradle +++ b/packages/google_mobile_ads/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 + compileSdkVersion 34 namespace 'io.flutter.plugins.googlemobileadsexample' @@ -36,7 +36,7 @@ android { defaultConfig { applicationId "io.flutter.plugins.googlemobileadsexample" minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart index 48709bae4..85d53b8cb 100644 --- a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart +++ b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart @@ -55,7 +55,7 @@ class _InlineAdaptiveExampleState extends State { _adWidth.truncate()); _inlineAdaptiveAd = AdManagerBannerAd( - adUnitId: '/6499/example/adaptive-banner', + adUnitId: '/21775744923/example/banner', sizes: [size], request: AdManagerAdRequest(), listener: AdManagerBannerAdListener( From 9535f279655aefca3e47834a68efb043f58a39b4 Mon Sep 17 00:00:00 2001 From: Justin Malandruccolo Date: Sun, 30 Jun 2024 21:52:57 -0400 Subject: [PATCH 2/2] Updated android only --- .../example/lib/inline_adaptive_example.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart index 85d53b8cb..c6d4fc59e 100644 --- a/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart +++ b/packages/google_mobile_ads/example/lib/inline_adaptive_example.dart @@ -14,6 +14,8 @@ // ignore_for_file: public_member_api_docs +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'constants.dart'; @@ -55,7 +57,9 @@ class _InlineAdaptiveExampleState extends State { _adWidth.truncate()); _inlineAdaptiveAd = AdManagerBannerAd( - adUnitId: '/21775744923/example/banner', + adUnitId: Platform.isAndroid + ? '/21775744923/example/banner' + : '/6499/example/adaptive-banner', sizes: [size], request: AdManagerAdRequest(), listener: AdManagerBannerAdListener(