Rebinding adcontainer to IMA SDK android

160 views
Skip to first unread message

Toby Bonhof

unread,
Nov 19, 2020, 10:28:49 AM11/19/20
to Interactive Media Ads SDK
Dear,


Currently we are building a new Video SDK in Android which uses the IMA SDK 3.19.4 for Android. Currently the architecture of our Video SDK requires us to create a *new* Activity whenever the user switches the video player to full screen. This is because we have no control over the context in which the video is being played. Which in turns means we can not utilize the configChanges from Android.
What i wanted to do is to rebind a new adcontainer viewgroup to the AdsLoader or to the ima sdk in some way. unfortunately i have not found that this is possible without creating a whole new AdsLoader and thus starting the ads all over from the beginning. This would cause for a really poor user experience.

Is there any way we could rebind a new ad container so that the ima sdk gets drawn into the newly created overlay view. for seamless playback of the video.

kind regards,
Toby Bonhof
DPG Media

IMA SDK

unread,
Nov 19, 2020, 8:39:05 PM11/19/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Toby,

Thank you for sharing what you would like to do with our SDK in your SDK with us. What I get from what you are saying, you want to offer an SDK that can survive configuration changes that "are out of your control" and continue going where left off in content and ads. Currently, our Sample apps limit configuration changes in the manifest to provide continuity and we have no support for this in our SDK. Here are a couple of questions:
  1. Do you want this in client side or DAI or both? 
  2. SDK's have requirements to use them correctly - making configChange in Manifest a requirement may be easier for users of your SDK than other styles of continuity because there's a great deal of plumbing in a configuration change that has to take place. Is there a real desire for this by end users/publishers? 
  3. What style would you be interested in i.e. passing app context and attaching activity context dynamically, or exposing a method to get the VAST and save it and restart from the middle or something else?
  4. Any other suggestions are welcome.
Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref

Toby Bonhof

unread,
Nov 20, 2020, 4:38:40 AM11/20/20
to Interactive Media Ads SDK
Hi!

Thanks for getting back to me.
  1. Do you want this in client side or DAI or both? 
Client side i believe :) not sure what DAI is.

- SDK's have requirements to use them correctly - making configChange in Manifest a requirement may be easier for users of your SDK than other styles of continuity because there's a great deal of plumbing in a configuration change that has to take place. Is there a real desire for this by end users/publishers? 

I understand that SDK can put up requirements towards their clients. But the problem is that our clients can typically not control the config changes as well since our organisation and therefore the apps are really structured in modules. Not all of our platforms (apps, our clients, or consumers of the SDK) are written in pure Android. some of them are written in React-Native which makes handeling activities and states really hard if not impossible. That's why when a video goes full screen we actually create a NEW activity (FullscreenActivity.kt) and decouple the ExoPlayer from the previously playing Textureview and pass it into the newly created textureview by FullscreenActivity.kt. This is why configchanges are out of the question. And why we need to rebind the ad display container to a new container.

What style would you be interested in i.e. passing app context and attaching activity context dynamically, or exposing a method to get the VAST and save it and restart from the middle or something else?

I would be interested in some kind of setter on the `AdDisplayContainer` to rebind a new ad container to the currently playing ad.

Something like this:

// we first create the original (inline player) ad display container 
val adDisplayContainer = ImaSdkFactory.createAdDisplayContainer(currentAdContainerViewGroup, adPlayer)
// Video and ad are playing
// user decides to play fullscreen
// FullscreenActivity.kt gets created, new VideoView gets created, and gets binded to the currently playing ExoPlayer
// Ima SDK now needs to rebind to the newly created ad container
adDisplayContainer.setAdContainer(newlyCreatedAdContainerViewGroup)
// IMA SDK starts to draw the overlay in the new container

I hope the abvove usecase / flow makes sense.

Thanks in advance. If need be I'm always available for a call. 

Toby Bonhof

IMA SDK

unread,
Nov 20, 2020, 10:51:49 AM11/20/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Tony,

Thank you for the feedback. I raised your request up to the rest of my team. You may monitor our release notes for an update.

IMA SDK

unread,
Nov 20, 2020, 12:52:59 PM11/20/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Toby,

My team circled back to me and we are requesting can you supply a project based on our Sample apps that demonstrates what your use case is missing with steps to illustrate what is missing and what functionality you would like?

Toby Bonhof

unread,
Nov 24, 2020, 4:08:09 AM11/24/20
to Interactive Media Ads SDK
Hi!

I will work on getting a sample ready for you guys in the coming days. To what email can i send a zip with the project?

IMA SDK

unread,
Nov 24, 2020, 5:57:51 AM11/24/20
to to...@mychannels.com, ima...@googlegroups.com

Hi Toby,

Thank you for your response. You can send the project file to our email alias: imate...@gmail.com.


Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref

Toby Bonhof

unread,
Nov 24, 2020, 7:13:18 AM11/24/20
to Interactive Media Ads SDK
The sample has been sent out to the email address you've mentioned above

IMA SDK

unread,
Nov 24, 2020, 11:04:23 AM11/24/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Toby,

thank you for responding back. I work along with Sherwin and Aryeh. As such I will be helping you today. Thank you for the sample app. I have brought this to our teams attention and they will be certain to look this over and see what we can do to helop you. Once we have some feedback, we will be sure to pass it along.

Regards
Google Logo
William Pescherine
IMA SDK Team
 



 

ref:_00D1U1174p._5004Q27v9G6:ref

Toby Bonhof

unread,
Dec 4, 2020, 2:55:27 AM12/4/20
to Interactive Media Ads SDK
Hi all,

Any news on this topic?

IMA SDK

unread,
Dec 4, 2020, 8:29:21 AM12/4/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Toby,

Thank you for expressing interest in how it's going. My team has been looking at your proposal. I relayed your message to my team. You may monitor our release notes for an update.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref

IMA SDK

unread,
Dec 10, 2020, 3:48:50 PM12/10/20
to to...@mychannels.com, ima...@googlegroups.com
Hi Toby,

My team has a question on how your exoplayer integration would look - they're not clear on why the process for "decoupling the ExoPlayer instance and passing it to the new activity" can't also be used for the AdsLoader and AdDisplayContainer. Could you clarify what this process is?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref

Toby Bonhof

unread,
Dec 11, 2020, 2:01:26 AM12/11/20
to Interactive Media Ads SDK
That is possible and exactly the thing I am doing however. When creating a new activity the views that are created are new instances. And the AdsLoader that is in memory will still have a reference to the old view group of Activity A in which it is drawing the ad overlay. That's why i need to re-set the viewgroup of the ad display container to the ad loader.

The AdDisplayContainer needs to get an updated viewgroup of the newly created activity. and your current sdk / api does not allow me to do that.

Toby

IMA SDK

unread,
Dec 11, 2020, 4:39:48 AM12/11/20
to to...@mychannels.com, ima...@googlegroups.com

Hi Toby,

Thank you for your response. Let me relay this information to my teammates and will give you feedback once we have an update.


Regards,


Google Logo
Sherwin Diesta
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref

IMA SDK

unread,
Jun 24, 2021, 6:19:22 AM6/24/21
to to...@mychannels.com, ima...@googlegroups.com

Hi there,

 

I hope you are doing well.

 

Random checking on old cases. Would want to know if this issue still occurs on your end?

 

Regards,

Google Logo
Michael Angelo Legaspi
IMA SDK Team
 


ref:_00D1U1174p._5004Q27v9G6:ref
Reply all
Reply to author
Forward
0 new messages