Skip to content

Commit ad4f3b2

Browse files
malandr2Justin Malandruccolo
andauthored
[Sample] Updated test ad unit id for Android inline adaptive banner (#1119)
* Updated ad id for banner sample * Updated android only --------- Co-authored-by: Justin Malandruccolo <jmalandruccolo@google.com>
1 parent 0baba2e commit ad4f3b2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/google_mobile_ads/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 33
28+
compileSdkVersion 34
2929

3030
namespace 'io.flutter.plugins.googlemobileadsexample'
3131

@@ -36,7 +36,7 @@ android {
3636
defaultConfig {
3737
applicationId "io.flutter.plugins.googlemobileadsexample"
3838
minSdkVersion 21
39-
targetSdkVersion 33
39+
targetSdkVersion 34
4040
versionCode flutterVersionCode.toInteger()
4141
versionName flutterVersionName
4242
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

packages/google_mobile_ads/example/lib/inline_adaptive_example.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
// ignore_for_file: public_member_api_docs
1616

17+
import 'dart:io';
18+
1719
import 'package:flutter/material.dart';
1820
import 'package:google_mobile_ads/google_mobile_ads.dart';
1921
import 'constants.dart';
@@ -55,7 +57,9 @@ class _InlineAdaptiveExampleState extends State<InlineAdaptiveExample> {
5557
_adWidth.truncate());
5658

5759
_inlineAdaptiveAd = AdManagerBannerAd(
58-
adUnitId: '/6499/example/adaptive-banner',
60+
adUnitId: Platform.isAndroid
61+
? '/21775744923/example/banner'
62+
: '/6499/example/adaptive-banner',
5963
sizes: [size],
6064
request: AdManagerAdRequest(),
6165
listener: AdManagerBannerAdListener(

0 commit comments

Comments
 (0)