Skip to content

[interactive_media_ads] Adds initial Android implementation #6733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 90 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
9f02730
get libraries to generate
bparrishMines Apr 26, 2024
5f767fb
add a bunch of classes
bparrishMines Apr 26, 2024
b3317a0
some more videview stuff
bparrishMines Apr 26, 2024
631c1e0
some display implementation for android
bparrishMines Apr 27, 2024
35a4445
add the minimum required wrappings
bparrishMines Apr 29, 2024
8ac0311
fix build error
bparrishMines Apr 29, 2024
bc4d770
implement other platform classes
bparrishMines Apr 30, 2024
1f74ead
start creating an implementation
bparrishMines Apr 30, 2024
4320f50
move interfaces to bottom and format
bparrishMines Apr 30, 2024
e85027d
fix callback events
bparrishMines May 6, 2024
6739d7f
remove prints
bparrishMines May 7, 2024
e803962
fix removeStrongReference error
bparrishMines May 7, 2024
0d59a8e
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 9, 2024
6b22ebc
also send time updates
bparrishMines May 9, 2024
957e2ba
combine implementation files
bparrishMines May 9, 2024
d0be873
fix lint warnings
bparrishMines May 9, 2024
875d6be
fix Android dartPluginClass
bparrishMines May 9, 2024
0122f6c
fix missing params call
bparrishMines May 9, 2024
d0971db
make tracking ad progress in ad display container
bparrishMines May 10, 2024
6b8ee3a
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 14, 2024
b1ace40
add missing error codes
bparrishMines May 14, 2024
cc728d2
discard ad break
bparrishMines May 14, 2024
f345071
licenses
bparrishMines May 14, 2024
90965aa
copyright header
bparrishMines May 14, 2024
93c239b
first test file
bparrishMines May 14, 2024
c1b00f1
working tests
bparrishMines May 14, 2024
dce1723
more working tests
bparrishMines May 14, 2024
76af339
more tests
bparrishMines May 14, 2024
c2d6f67
media player test
bparrishMines May 14, 2024
9dde9d6
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 14, 2024
15aa049
some more tests
bparrishMines May 14, 2024
7c3dc18
finish platform unit tests
bparrishMines May 14, 2024
48c7a42
switch tests to use TestProxyApiRegistrar
bparrishMines May 14, 2024
c5842ad
fix ad size
bparrishMines May 14, 2024
8157448
version bump
bparrishMines May 15, 2024
37fce6f
fix name
bparrishMines May 15, 2024
f00caf2
remove pigeon bro
bparrishMines May 15, 2024
979ad8c
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 15, 2024
bdac900
start proxy
bparrishMines May 15, 2024
9250e8d
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 16, 2024
1dc6a07
change calls to proxy
bparrishMines May 16, 2024
713bdbd
remove pigeon
bparrishMines May 16, 2024
828ea3a
documentation
bparrishMines May 16, 2024
b4e8cda
fix key and some cleanup
bparrishMines May 16, 2024
c25d360
working addisplaycontainer test
bparrishMines May 16, 2024
849ca63
erge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 17, 2024
b182af5
onerror and oncompletion test
bparrishMines May 19, 2024
e2fb27e
on prepared test
bparrishMines May 19, 2024
48fb4de
pause ad and play ad tests
bparrishMines May 19, 2024
0bbba9a
assert and tests
bparrishMines May 20, 2024
1ce77c1
request ads and onAdsLoaded test
bparrishMines May 20, 2024
c7a320e
finish tests
bparrishMines May 20, 2024
a558a54
finish basic tests
bparrishMines May 20, 2024
1c3a2c2
finish all tests
bparrishMines May 20, 2024
428ecec
formatting
bparrishMines May 20, 2024
e8d822c
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 20, 2024
5311d85
version bump and license
bparrishMines May 20, 2024
ba23b1d
lower kotlin version
bparrishMines May 20, 2024
52a2c49
try fix lint
bparrishMines May 20, 2024
f32e74f
update generated kotlin
bparrishMines May 20, 2024
75957f2
override pigeonRegistrar type
bparrishMines May 20, 2024
6743d69
make platform classes base to be mockable
bparrishMines May 20, 2024
3edc221
separate some logic
bparrishMines May 20, 2024
3893efe
separate class implementations
bparrishMines May 20, 2024
1c5fac7
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 20, 2024
a30c9fc
doc improvements
bparrishMines May 20, 2024
8fa430b
lower meta version to 1.12.0
bparrishMines May 20, 2024
220e2f0
move meta to 1.10.0
bparrishMines May 20, 2024
f55805f
only null ad duration on stop and error
bparrishMines May 21, 2024
284098a
stop any ad tracking before starting a new one
bparrishMines May 21, 2024
69e088c
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 21, 2024
48828e3
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 22, 2024
891f4d4
stop ad progress tracking on video completion
bparrishMines May 22, 2024
9ada3ef
change generated kotlin library name
bparrishMines May 30, 2024
84d1ff5
docs for kotlin classes
bparrishMines May 30, 2024
1abcabc
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 30, 2024
b4b2152
variable docs
bparrishMines May 31, 2024
519c68e
beef up docs and some formatting
bparrishMines May 31, 2024
f7d25c6
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines May 31, 2024
8923d5f
uncomment pigeon file
bparrishMines Jun 1, 2024
9145273
an
bparrishMines Jun 2, 2024
c3ce374
add an unknown value for enum
bparrishMines Jun 3, 2024
5e11462
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines Jun 3, 2024
24f0baa
Merge branch 'main' of github.com:flutter/packages into ima_android
bparrishMines Jun 25, 2024
dc6f38a
comment pigeon
bparrishMines Jun 25, 2024
819441a
add flutter request agent
bparrishMines Jun 25, 2024
eda9cac
request agent test
bparrishMines Jun 25, 2024
6a18fac
formatting and lint
bparrishMines Jun 25, 2024
4829c85
only run example on Android
bparrishMines Jun 25, 2024
463bfe4
small nits
bparrishMines Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/interactive_media_ads/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.2

* Adds Android implementation.

## 0.0.1+3

* Fixes the pub badge source.
Expand Down
6 changes: 6 additions & 0 deletions packages/interactive_media_ads/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ android {

dependencies {
implementation 'androidx.annotation:annotation:1.8.0'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
testImplementation 'org.mockito:mockito-inline:5.1.0'
testImplementation 'androidx.test:core:1.3.0'

// org.jetbrains.kotlin:kotlin-bom artifact purpose is to align kotlin stdlib and related code versions.
// See: https://youtrack.jetbrains.com/issue/KT-55297/kotlin-stdlib-should-declare-constraints-on-kotlin-stdlib-jdk8-and-kotlin-stdlib-jdk7
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.10"))
Copy link
Contributor Author

@bparrishMines bparrishMines May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same line added to camera_android_camerax: https://github.com/flutter/packages/blob/main/packages/camera/camera_android_camerax/android/build.gradle#L77

This fixed the build failure when adding the 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0' dependency.

}

lintOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

/**
* ProxyApi implementation for [com.google.ads.interactivemedia.v3.api.AdDisplayContainer].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdDisplayContainerProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdDisplayContainer(pigeonRegistrar)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdError
import com.google.ads.interactivemedia.v3.api.AdErrorEvent

/**
* ProxyApi implementation for [AdErrorEvent].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdErrorEventProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdErrorEvent(pigeonRegistrar) {
override fun error(pigeon_instance: AdErrorEvent): AdError {
return pigeon_instance.error
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdErrorEvent

/**
* ProxyApi implementation for [AdErrorEvent.AdErrorListener].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdErrorListenerProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdErrorListener(pigeonRegistrar) {
internal class AdErrorListenerImpl(val api: AdErrorListenerProxyApi) :
AdErrorEvent.AdErrorListener {
override fun onAdError(event: AdErrorEvent) {
api.pigeonRegistrar.runOnMainThread { api.onAdError(this, event) {} }
}
}

override fun pigeon_defaultConstructor(): AdErrorEvent.AdErrorListener {
return AdErrorListenerImpl(this)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdError

/**
* ProxyApi implementation for [AdError].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdErrorProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdError(pigeonRegistrar) {
override fun errorCode(pigeon_instance: AdError): AdErrorCode {
return when (pigeon_instance.errorCode) {
AdError.AdErrorCode.ADS_PLAYER_NOT_PROVIDED -> AdErrorCode.ADS_PLAYER_WAS_NOT_PROVIDED
AdError.AdErrorCode.INTERNAL_ERROR -> AdErrorCode.INTERNAL_ERROR
AdError.AdErrorCode.VAST_MALFORMED_RESPONSE -> AdErrorCode.VAST_MALFORMED_RESPONSE
AdError.AdErrorCode.UNKNOWN_AD_RESPONSE -> AdErrorCode.UNKNOWN_AD_RESPONSE
AdError.AdErrorCode.VAST_TRAFFICKING_ERROR -> AdErrorCode.VAST_TRAFFICKING_ERROR
AdError.AdErrorCode.VAST_LOAD_TIMEOUT -> AdErrorCode.VAST_LOAD_TIMEOUT
AdError.AdErrorCode.VAST_TOO_MANY_REDIRECTS -> AdErrorCode.VAST_TOO_MANY_REDIRECTS
AdError.AdErrorCode.VAST_NO_ADS_AFTER_WRAPPER -> AdErrorCode.VAST_NO_ADS_AFTER_WRAPPER
AdError.AdErrorCode.VIDEO_PLAY_ERROR -> AdErrorCode.VIDEO_PLAY_ERROR
AdError.AdErrorCode.VAST_MEDIA_LOAD_TIMEOUT -> AdErrorCode.VAST_MEDIA_LOAD_TIMEOUT
AdError.AdErrorCode.VAST_LINEAR_ASSET_MISMATCH -> AdErrorCode.VAST_LINEAR_ASSET_MISMATCH
AdError.AdErrorCode.OVERLAY_AD_PLAYING_FAILED -> AdErrorCode.OVERLAY_AD_PLAYING_FAILED
AdError.AdErrorCode.OVERLAY_AD_LOADING_FAILED -> AdErrorCode.OVERLAY_AD_LOADING_FAILED
AdError.AdErrorCode.VAST_NONLINEAR_ASSET_MISMATCH -> AdErrorCode.VAST_NONLINEAR_ASSET_MISMATCH
AdError.AdErrorCode.COMPANION_AD_LOADING_FAILED -> AdErrorCode.COMPANION_AD_LOADING_FAILED
AdError.AdErrorCode.UNKNOWN_ERROR -> AdErrorCode.UNKNOWN_ERROR
AdError.AdErrorCode.VAST_EMPTY_RESPONSE -> AdErrorCode.VAST_EMPTY_RESPONSE
AdError.AdErrorCode.FAILED_TO_REQUEST_ADS -> AdErrorCode.FAILED_TO_REQUEST_ADS
AdError.AdErrorCode.VAST_ASSET_NOT_FOUND -> AdErrorCode.VAST_ASSET_NOT_FOUND
AdError.AdErrorCode.ADS_REQUEST_NETWORK_ERROR -> AdErrorCode.ADS_REQUEST_NETWORK_ERROR
AdError.AdErrorCode.INVALID_ARGUMENTS -> AdErrorCode.INVALID_ARGUMENTS
AdError.AdErrorCode.PLAYLIST_NO_CONTENT_TRACKING -> AdErrorCode.PLAYLIST_NO_CONTENT_TRACKING
AdError.AdErrorCode.UNEXPECTED_ADS_LOADED_EVENT -> AdErrorCode.UNEXPECTED_ADS_LOADED_EVENT
else -> AdErrorCode.UNKNOWN
}
}

override fun errorCodeNumber(pigeon_instance: AdError): Long {
return pigeon_instance.errorCodeNumber.toLong()
}

override fun errorType(pigeon_instance: AdError): AdErrorType {
return when (pigeon_instance.errorType) {
AdError.AdErrorType.LOAD -> AdErrorType.LOAD
AdError.AdErrorType.PLAY -> AdErrorType.PLAY
else -> AdErrorType.UNKNOWN
}
}

override fun message(pigeon_instance: AdError): String {
return pigeon_instance.message
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdEvent

/**
* ProxyApi implementation for [AdEvent.AdEventListener].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdEventListenerProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdEventListener(pigeonRegistrar) {
internal class AdEventListenerImpl(val api: AdEventListenerProxyApi) : AdEvent.AdEventListener {
override fun onAdEvent(event: AdEvent) {
api.pigeonRegistrar.runOnMainThread { api.onAdEvent(this, event) {} }
}
}

override fun pigeon_defaultConstructor(): AdEvent.AdEventListener {
return AdEventListenerImpl(this)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdEvent

/**
* ProxyApi implementation for [AdEvent].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdEventProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdEvent(pigeonRegistrar) {
override fun type(pigeon_instance: AdEvent): AdEventType {
return when (pigeon_instance.type) {
AdEvent.AdEventType.ALL_ADS_COMPLETED -> AdEventType.ALL_ADS_COMPLETED
AdEvent.AdEventType.AD_BREAK_FETCH_ERROR -> AdEventType.AD_BREAK_FETCH_ERROR
AdEvent.AdEventType.CLICKED -> AdEventType.CLICKED
AdEvent.AdEventType.COMPLETED -> AdEventType.COMPLETED
AdEvent.AdEventType.CUEPOINTS_CHANGED -> AdEventType.CUEPOINTS_CHANGED
AdEvent.AdEventType.CONTENT_PAUSE_REQUESTED -> AdEventType.CONTENT_PAUSE_REQUESTED
AdEvent.AdEventType.CONTENT_RESUME_REQUESTED -> AdEventType.CONTENT_RESUME_REQUESTED
AdEvent.AdEventType.FIRST_QUARTILE -> AdEventType.FIRST_QUARTILE
AdEvent.AdEventType.LOG -> AdEventType.LOG
AdEvent.AdEventType.AD_BREAK_READY -> AdEventType.AD_BREAK_READY
AdEvent.AdEventType.MIDPOINT -> AdEventType.MIDPOINT
AdEvent.AdEventType.PAUSED -> AdEventType.PAUSED
AdEvent.AdEventType.RESUMED -> AdEventType.RESUMED
AdEvent.AdEventType.SKIPPABLE_STATE_CHANGED -> AdEventType.SKIPPABLE_STATE_CHANGED
AdEvent.AdEventType.SKIPPED -> AdEventType.SKIPPED
AdEvent.AdEventType.STARTED -> AdEventType.STARTED
AdEvent.AdEventType.TAPPED -> AdEventType.TAPPED
AdEvent.AdEventType.ICON_TAPPED -> AdEventType.ICON_TAPPED
AdEvent.AdEventType.ICON_FALLBACK_IMAGE_CLOSED -> AdEventType.ICON_FALLBACK_IMAGE_CLOSED
AdEvent.AdEventType.THIRD_QUARTILE -> AdEventType.THIRD_QUARTILE
AdEvent.AdEventType.LOADED -> AdEventType.LOADED
AdEvent.AdEventType.AD_PROGRESS -> AdEventType.AD_PROGRESS
AdEvent.AdEventType.AD_BUFFERING -> AdEventType.AD_BUFFERING
AdEvent.AdEventType.AD_BREAK_STARTED -> AdEventType.AD_BREAK_STARTED
AdEvent.AdEventType.AD_BREAK_ENDED -> AdEventType.AD_BREAK_ENDED
AdEvent.AdEventType.AD_PERIOD_STARTED -> AdEventType.AD_PERIOD_STARTED
AdEvent.AdEventType.AD_PERIOD_ENDED -> AdEventType.AD_PERIOD_ENDED
else -> AdEventType.UNKNOWN
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.player.AdMediaInfo

/**
* ProxyApi implementation for [AdMediaInfo].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdMediaInfoProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdMediaInfo(pigeonRegistrar) {
override fun url(pigeon_instance: AdMediaInfo): String {
return pigeon_instance.url
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdPodInfo

/**
* ProxyApi implementation for [AdPodInfo].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdPodInfoProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdPodInfo(pigeonRegistrar) {
override fun adPosition(pigeon_instance: AdPodInfo): Long {
return pigeon_instance.adPosition.toLong()
}

override fun maxDuration(pigeon_instance: AdPodInfo): Double {
return pigeon_instance.maxDuration
}

override fun podIndex(pigeon_instance: AdPodInfo): Long {
return pigeon_instance.podIndex.toLong()
}

override fun timeOffset(pigeon_instance: AdPodInfo): Double {
return pigeon_instance.timeOffset
}

override fun totalAds(pigeon_instance: AdPodInfo): Long {
return pigeon_instance.totalAds.toLong()
}

override fun isBumper(pigeon_instance: AdPodInfo): Boolean {
return pigeon_instance.isBumper
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdsLoader
import com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent

/**
* ProxyApi implementation for [AdsLoader.AdsLoadedListener].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdsLoadedListenerProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdsLoadedListener(pigeonRegistrar) {
internal class AdsLoadedListenerImpl(val api: AdsLoadedListenerProxyApi) :
AdsLoader.AdsLoadedListener {
override fun onAdsManagerLoaded(event: AdsManagerLoadedEvent) {
api.pigeonRegistrar.runOnMainThread { api.onAdsManagerLoaded(this, event) {} }
}
}

override fun pigeon_defaultConstructor(): AdsLoader.AdsLoadedListener {
return AdsLoadedListenerImpl(this)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdErrorEvent
import com.google.ads.interactivemedia.v3.api.AdsLoader
import com.google.ads.interactivemedia.v3.api.AdsRequest

/**
* ProxyApi implementation for [AdsLoader].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdsLoaderProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdsLoader(pigeonRegistrar) {
override fun addAdErrorListener(
pigeon_instance: AdsLoader,
listener: AdErrorEvent.AdErrorListener
) {
pigeon_instance.addAdErrorListener(listener)
}

override fun addAdsLoadedListener(
pigeon_instance: AdsLoader,
listener: AdsLoader.AdsLoadedListener
) {
pigeon_instance.addAdsLoadedListener(listener)
}

override fun requestAds(pigeon_instance: AdsLoader, request: AdsRequest) {
pigeon_instance.requestAds(request)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.packages.interactive_media_ads

import com.google.ads.interactivemedia.v3.api.AdsManager
import com.google.ads.interactivemedia.v3.api.AdsManagerLoadedEvent

/**
* ProxyApi implementation for [AdsManagerLoadedEvent].
*
* <p>This class may handle instantiating native object instances that are attached to a Dart
* instance or handle method calls on the associated native class or an instance of that class.
*/
class AdsManagerLoadedEventProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
PigeonApiAdsManagerLoadedEvent(pigeonRegistrar) {
override fun manager(pigeon_instance: AdsManagerLoadedEvent): AdsManager {
return pigeon_instance.adsManager
}
}
Loading