IMA SDK keeps sending request in the background

179 views
Skip to first unread message

Kerstin Götze

unread,
Apr 22, 2021, 5:59:36 AM4/22/21
to Interactive Media Ads SDK

Hi,

we have the IMA/DAI SDK for our TV streaming platform, which runs on Fire TV and Android TV. We recently discovered an issue, where the SDK keeps sending requests in the background even though the app has been closed. Only force stopping the app will stop the requests.

We where able to reproduce this issue with your Sample Application by using an asset key for one of our test streams and monitoring the requests with Charles proxy.

These are the steps to reproduce it:
  1. Use custom asset key for live stream in sample app (I don't want to post it here but can provide it on request)
  2. Prepare the app and the Fire TV device for working with Charles Proxy (install certificate, etc...)
  3. Install Sample App on FTV and start it with the test stream
  4. start monitoring IMA/DAI calls in Charles
  5. close app by returning to the FTV home screen
Expected Result:
after closing the app there are no request by the IMA/DAI SDK anymore

Actual Result:

In our application we see this bahaviour especially if our maniphisto streaming server is not available on startup of the DAI stream. In this case the DAI requests keep adding up in the background for each stream we try to start.
Tearing down the SDK doesn't help.

Do you have any idea how we can handle this and stop the SDK from sending requests?

Greetings
Kerstin

IMA SDK

unread,
Apr 22, 2021, 12:09:36 PM4/22/21
to goe...@rockabyte.com, ima...@googlegroups.com
Hi Kersten,

If you are using our HTML5 SDK then "streamManager.reset();" should do the trick. If you are using the Android SDK, can you replicate this issue in one of our sample apps?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2FafZ9:ref

Kerstin Götze

unread,
Apr 23, 2021, 1:56:56 AM4/23/21
to Interactive Media Ads SDK
Hi Aryeh,

we are using the Android SDK and as described above we can reproduce it in the sample app.

Regards, Kerstin

IMA SDK

unread,
Apr 23, 2021, 6:26:53 AM4/23/21
to goe...@rockabyte.com, ima...@googlegroups.com
Hi Kerstin,

I work along with Aryeh. Thank you for getting back to us. Would it be possible for you to provide a sample project (you may modify our sample app for this) reproducing the issue? This will greatly help us investigating the said behavior. You may send the requested information via Reply privately to author option. If the mentioned option does not work on your end, you may send it directly to imate...@gmail.com, then let us know here once you've sent it.

Regards,
Google Logo
Teejay Wennie Pimentel
IMA SDK Team
 


ref:_00D1U1174p._5004Q2FafZ9:ref

Kerstin Götze

unread,
Apr 26, 2021, 10:49:21 AM4/26/21
to Interactive Media Ads SDK
Hi Teejay,

thanks for investigating this. Unfortunately I am not able to reply privately so I just send an email with a download link to the adress mentioned above

Regards, Kerstin

IMA SDK

unread,
Apr 26, 2021, 12:04:13 PM4/26/21
to goe...@rockabyte.com, ima...@googlegroups.com
Hi Kerstin,

I tried downloading the sample from the email but was blocked from doing so. Could you post on this thread once you have given access to our testing alias imate...@gmail.com?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2FafZ9:ref

Kerstin Götze

unread,
Apr 26, 2021, 12:05:37 PM4/26/21
to Interactive Media Ads SDK


Hey Aryeh,

access should be granted now.

Regards, Kerstin

IMA SDK

unread,
Apr 26, 2021, 3:31:40 PM4/26/21
to goe...@rockabyte.com, ima...@googlegroups.com
Hi Kerstin,

Thank you for giving me access. I followed your steps and saw that network activity continued when app was in background. I will bring up your request for a method to stop network activity when app is in background like "streamManager.reset();" in HTML5 SDK. You may monitor our release notes for an update.

In the meantime,  if you call release() on the SampleVideoPlayer and then call adsLoader.release() no more network activity happens in the background. 

Kerstin Götze

unread,
Apr 27, 2021, 3:25:55 AM4/27/21
to Interactive Media Ads SDK
Hi Aryeh,

thank you for looking into this. I only want to mention that we are using the Android SDK. So it would be nice to have the "streamManager.reset();" method there as well.
For now I will try calling release() on the video player and adsLoader in our production app and see if it helps.

Regards, Kerstin

Alex Champagne

unread,
Jun 11, 2024, 3:36:37 AMJun 11
to Interactive Media Ads SDK
Hi, I am also experiencing this issue using the IMA DAI Android SDK, and am wondering if there were any updates for this issue?  I am using the latest stable release of Media3.

IMA SDK

unread,
Jun 11, 2024, 5:46:20 AMJun 11
to acfx...@gmail.com, ima...@googlegroups.com

Hi,

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02FafZ9:ref" (ADR-00064358)

Thanks,
 
Google Logo IMA SDK Team


IMA SDK

unread,
Jun 11, 2024, 2:05:25 PMJun 11
to ima...@googlegroups.com, acfx...@gmail.com

Hi,

Would you be able to provide me with a sample project that can be used to replicate the issue? If so, please also include the steps involved in reproducing the problem.

Have you also attempted the above work-around by calling SampleVideoPlayer.release() and then calling adsLoader.release() after appending ends. If the issue persists after attempting this solution, please respond to us by providing an sample application through the provided link.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, kindly provide requested information to us via reply to author option or using the steps below:

1. Navigate to
https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002FafZ9QAJ&entry.80707362=00064358

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Alex Champagne

unread,
Jun 19, 2024, 8:35:59 AMJun 19
to Interactive Media Ads SDK
I am working on creating a sample project to replicate the issue. The ExoPlayerExample project is quite basic, and does not support Picture-in-picture mode, nor does it have a media browser which are both requirements to repro the bug I am referring to.  

 While I am working on that, I think it's worth noting that I am doubtful calling player.release() and adsLoader.release() will work for my specific use case.  The reason being is that we are seeing this bug happen when the user is playing a live stream, puts the player into PiP mode, and then plays another live stream from the browse screen of our app. In this case, we only reach onPause() of the activity lifecycle when the player activity is put into PiP mode.  Releasing the adsLoader and player every time the user switches content does not seem like the correct approach, as the player and adsLoader would have to be destroyed and created multiple times while the activity is running. 

Being able to notify the IMA SDK that the stream is no longer active without releasing the adsLoader or player seems like a better approach from my preliminary investigations. 

Alex Champagne

unread,
Jun 19, 2024, 8:36:04 AMJun 19
to Interactive Media Ads SDK
This bug occurs when the user is watching a live stream, puts the player activity into picture-in-picture mode (which causes the activity to enter the onPause() lifecycle state), and selects a different live stream for playback from the browse activity, while the original live stream is playing in the PiP window.  For this reason, I don't think that calling player.release() and adsLoader.release() will do what we want, as we will have to destroy and recreate the player and adsLoader while the activity is running.  Being able to notify the IMA DAI SDK that the stream has finished without releasing the player and adsLoader seems like the best option here, and to my understanding, the streamManager.reset() method suppled by the HTML5 SDK achieves this. 

Working off the ExoPlayerExample to create a sample project to repro the issue will take a bit of time, as I will need to add Picture-in-Picture support, as well as a media browser that lets the user player a different live stream while the initial live stream is playing in the PiP window.  

In the meantime, can you confirm whether or not there are any plans to fix this issue without releasing the player and adsLoader? 


On Tuesday, June 11, 2024 at 11:05:25 AM UTC-7 IMA SDK wrote:

IMA SDK

unread,
Jun 19, 2024, 2:47:45 PMJun 19
to acfx...@gmail.com, ima...@googlegroups.com
Hi,

Your concern is under discussion and will get back to you once i got any updates on it.
Thanks

IMA SDK

unread,
Jul 9, 2024, 5:09:05 AMJul 9
to ima...@googlegroups.com, acfx...@gmail.com
Hi,

To replicate issue from your end, could you share Sample Project with us.
Or if it's possible you can simplify the issue in an Google Sample Project. Maybe having a single player that attempts to switch to an different livestream when a button is pressed.

Kindly provide issue replication project in this link.
Reply all
Reply to author
Forward
0 new messages