CompanionAdSlot for audio content on Android

57 views
Skip to first unread message

c wei

unread,
Jun 23, 2021, 11:57:09 PM6/23/21
to Interactive Media Ads SDK
Hi  IMA team.

I have question about companionAdSlot.  I followed samples 
1 declare some viewGroups in layout ,and  use those viewGroups to createCompanionAdslot 
2 set slots to AdDisplayContainer via  AdDisplayContainer.setCompanionSlots().
3 then use AdDisplayContainer instance to ImaSdkFactory.createAdsLoader().

It works, companionAds can be rendered by IMA on those ViewGroup.
 
Because it is Audio content,  the activity can be finished and recreated during Ad playback., after recreated, the viewGroups are new ones, I can't find Apis to set those ViewGroup as new companionAdSlots ,  That means after UI was recreated, even the ads is still playing, companionAds can't displayed.

is there any api to handle such use case ?

Thanks!


IMA SDK

unread,
Jun 24, 2021, 5:08:04 AM6/24/21
to mot...@gmail.com, ima...@googlegroups.com

Hi there,

 

Thank you for reaching out to us.

 

I am not fully aware if your use case is currently supported, have you tried setting the view group as the new companion ad slots after the activity is recreated with the same process you do for the first time that is indicated in this guide? You could also try in our sample apps with little modification, see whats best fits to you. Update me and I will raise this to our team if nothing progressed.

Regards,

Google Logo
Michael Angelo Legaspi
IMA SDK Team
 


ref:_00D1U1174p._5004Q2IyI3E:ref

c wei

unread,
Jun 24, 2021, 11:14:40 AM6/24/21
to Interactive Media Ads SDK
Hi Michael:

you talked about that ?   
adsLoader.getAdDisplayContainer().setCompanionSlots(companionAdSlots);

getAdDisplayContainer() was gone from current sdk version already.  Can't use this method.

what I have done is : I kept an instance of AdDisplayContainer in app,  when activity was recreated , I created new slots and set into it.   

This way works for next Ads, but for current ad, if recreating activity during ad playback,  companion Ad can't be shown. 

IMA SDK

unread,
Jun 24, 2021, 12:46:35 PM6/24/21
to mot...@gmail.com, ima...@googlegroups.com
Hi there,

I work with Michael and will assist you. Could you send us privately a minimally modified sample project based on one of our sample apps so we can address your use case? Alternatively, you may send this via our testing alias imate...@gmail.com with a post on this thread once you have done so.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2IyI3E:ref

c wei

unread,
Jun 25, 2021, 12:01:59 PM6/25/21
to Interactive Media Ads SDK
Hi Aryeh:

I sent my sample project to the email address you shared.

Thanks.

IMA SDK

unread,
Jun 25, 2021, 5:47:55 PM6/25/21
to mot...@gmail.com, ima...@googlegroups.com
Hi C Wei,

Thank you for the response to our questions. I was able to check out the app that yiu sent us and run it. From what I can see, I was able to get the ad and audio to plat at the start and one other time after that. But once that happened I never got an ad again. In looking at the logcatss for the time the app was running. I see 2 things that pop out to me. First I keep seeing an issue where the app is throwing out an error message of wififorwarding is not a valid argument. As well as the following 

2021-06-25 17:40:16.314 530-549/system_process E/JobScheduler.Background: App com.google.android.gms became active but still in NEVER bucket

this one in particular is what I am thinking could be causing this issue as it would appear to be an issue with the scheduler.

Looking to see if you are getting the same things.

Regards,
Google Logo
William Pescherine
IMA SDK Team
 


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