-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[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
Changes from 1 commit
9f02730
5f767fb
b3317a0
631c1e0
35a4445
8ac0311
bc4d770
1f74ead
4320f50
e85027d
6739d7f
e803962
0d59a8e
6b22ebc
957e2ba
d0be873
875d6be
0122f6c
d0971db
6b8ee3a
b1ace40
cc728d2
f345071
90965aa
93c239b
c1b00f1
dce1723
76af339
c2d6f67
9dde9d6
15aa049
7c3dc18
48c7a42
c5842ad
8157448
37fce6f
f00caf2
979ad8c
bdac900
9250e8d
1dc6a07
713bdbd
828ea3a
b4e8cda
c25d360
849ca63
b182af5
e2fb27e
48fb4de
0bbba9a
1ce77c1
c7a320e
a558a54
1c3a2c2
428ecec
e8d822c
5311d85
ba23b1d
52a2c49
f32e74f
75957f2
6743d69
3edc221
3893efe
1c5fac7
a30c9fc
8fa430b
220e2f0
f55805f
284098a
69e088c
48828e3
891f4d4
9ada3ef
84d1ff5
1abcabc
b4b2152
519c68e
f7d25c6
8923d5f
9145273
c3ce374
5e11462
24f0baa
dc6f38a
819441a
eda9cac
6a18fac
4829c85
463bfe4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| // 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. | ||
|
|
||
| import 'interactive_media_ads.g.dart'; | ||
|
|
||
| /// Handles constructing objects and calling static methods for the Android | ||
|
|
@@ -10,19 +14,114 @@ import 'interactive_media_ads.g.dart'; | |
| /// By default each function calls the default constructor of the class it | ||
| /// intends to return. | ||
| class InteractiveMediaAdsProxy { | ||
| /// Constructs a [InteractiveMediaAdsProxy]. | ||
| /// Constructs an [InteractiveMediaAdsProxy]. | ||
| const InteractiveMediaAdsProxy({ | ||
| this.newVideoProgressUpdate = VideoProgressUpdate.new, | ||
| this.newFrameLayout = FrameLayout.new, | ||
| this.newVideoView = VideoView.new, | ||
| this.newVideoAdPlayer = VideoAdPlayer.new, | ||
| this.newAdsLoadedListener = AdsLoadedListener.new, | ||
| this.newAdErrorListener = AdErrorListener.new, | ||
| this.newAdEventListener = AdEventListener.new, | ||
| this.createAdDisplayContainerImaSdkFactory = | ||
| ImaSdkFactory.createAdDisplayContainer, | ||
| this.instanceImaSdkFactory = _instanceImaSdkFactory, | ||
| this.videoTimeNotReadyVideoProgressUpdate = | ||
| _videoTimeNotReadyVideoProgressUpdate, | ||
| }); | ||
|
|
||
| /// Creates a new [FrameLayout]. | ||
| /// Constructs [VideoProgressUpdate]. | ||
| final VideoProgressUpdate Function({ | ||
| required int currentTimeMs, | ||
| required int durationMs, | ||
| }) newVideoProgressUpdate; | ||
|
|
||
| /// Constructs [FrameLayout]. | ||
| final FrameLayout Function() newFrameLayout; | ||
|
|
||
| /// Creates a new [VideoView]. | ||
| /// Constructs [VideoView]. | ||
| final VideoView Function({ | ||
| void Function(VideoView, MediaPlayer)? onPrepared, | ||
| void Function(VideoView, MediaPlayer)? onCompletion, | ||
| required void Function(VideoView, MediaPlayer, int, int) onError, | ||
| required void Function( | ||
| VideoView, | ||
| MediaPlayer, | ||
| int, | ||
| int, | ||
| ) onError, | ||
| void Function( | ||
| VideoView, | ||
| MediaPlayer, | ||
|
||
| )? onPrepared, | ||
| void Function( | ||
| VideoView, | ||
| MediaPlayer, | ||
| )? onCompletion, | ||
| }) newVideoView; | ||
|
|
||
| /// Constructs [VideoAdPlayer]. | ||
| final VideoAdPlayer Function({ | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| VideoAdPlayerCallback, | ||
| ) addCallback, | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| AdMediaInfo, | ||
| AdPodInfo, | ||
| ) loadAd, | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| AdMediaInfo, | ||
| ) pauseAd, | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| AdMediaInfo, | ||
| ) playAd, | ||
| required void Function(VideoAdPlayer) release, | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| VideoAdPlayerCallback, | ||
| ) removeCallback, | ||
| required void Function( | ||
| VideoAdPlayer, | ||
| AdMediaInfo, | ||
| ) stopAd, | ||
| }) newVideoAdPlayer; | ||
|
|
||
| /// Constructs [AdsLoadedListener]. | ||
| final AdsLoadedListener Function( | ||
| {required void Function( | ||
| AdsLoadedListener, | ||
| AdsManagerLoadedEvent, | ||
| ) onAdsManagerLoaded}) newAdsLoadedListener; | ||
|
|
||
| /// Constructs [AdErrorListener]. | ||
| final AdErrorListener Function( | ||
| {required void Function( | ||
| AdErrorListener, | ||
| AdErrorEvent, | ||
| ) onAdError}) newAdErrorListener; | ||
|
|
||
| /// Constructs [AdEventListener]. | ||
| final AdEventListener Function( | ||
| {required void Function( | ||
| AdEventListener, | ||
| AdEvent, | ||
| ) onAdEvent}) newAdEventListener; | ||
|
|
||
| /// Calls to [ImaSdkFactory.createAdDisplayContainer]. | ||
| final Future<AdDisplayContainer> Function( | ||
| ViewGroup, | ||
| VideoAdPlayer, | ||
| ) createAdDisplayContainerImaSdkFactory; | ||
|
|
||
| /// Calls to [ImaSdkFactory.instance]. | ||
| final ImaSdkFactory Function() instanceImaSdkFactory; | ||
|
|
||
| /// Calls to [VideoProgressUpdate.videoTimeNotReady]. | ||
| final VideoProgressUpdate Function() videoTimeNotReadyVideoProgressUpdate; | ||
|
|
||
| static ImaSdkFactory _instanceImaSdkFactory() => ImaSdkFactory.instance; | ||
|
|
||
| static VideoProgressUpdate _videoTimeNotReadyVideoProgressUpdate() => | ||
| VideoProgressUpdate.videoTimeNotReady; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ dev_dependencies: | |
| pigeon: | ||
| git: | ||
| url: [email protected]:bparrishMines/packages.git | ||
| ref: pigeon_kotlin_split | ||
| ref: pigeon_helper | ||
| path: packages/pigeon | ||
|
|
||
| topics: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.