Android SDK user agent

488 views
Skip to first unread message

Ron Cococcia

unread,
Dec 16, 2015, 1:26:58 PM12/16/15
to Interactive Media Ads SDK
Hello,

I have been looking at the Android IMA SDK.  The sample player ad URL works fine in my app.  An ad URL that I was given to test with doesn't respond with any data.  I tried it in the examples and it has the same problem.  When I examine the Google Video Suite Inspector, it doesn't produce any data.I put the URL into my browser, I receive XML VAST feedback.

On my computer (linux), I curl the URL and get nothing (but the HTTP response code is 200).  Since my browser was able to obtain the VAST XML, I guessed that maybe the server is examining the user agent and only serving what it thinks is a browser.  I modify my curl request to provide a browser's user agent, and the XML data is available.

Is there a way I can set the user agent that the IMA SDK will use?  Is there something I'm missing with regards to how the ad server responds to certain clients?

Thanks,
Ron

Tyler Sidell (IMA SDK Team)

unread,
Dec 16, 2015, 2:11:26 PM12/16/15
to Interactive Media Ads SDK
Hi Ron,

Thank you for reaching out.  There is no API method to set the user agent that the IMA SDK will use.  However, there may be another issue that is occurring in this scenario.  Do you see any specific errors being thrown in either the VSI or the browser console?  

Please supply your ad tag for us to take a look further.  Does this occur with other tags that you test?  You've specified that you haven't had any problems with the sample tags but perhaps you could test an additional tag as well.  Without the tag, it will be difficult to pinpoint the culprit but it could be an issue with changing the correlator value.  This value is a random number that gets generated by the IMA SDK in order to manage frequency capping.


Thanks,
Tyler Sidell
IMA SDK Team

Ron Cococcia

unread,
Dec 17, 2015, 3:04:12 PM12/17/15
to Interactive Media Ads SDK
Hi Tyler,

Thank you for the info.  I'm not sure if I'm allowed to share the tag (my boss is away at the moment), but I did try some things as you suggested.

The tag is 'http'.  The VSI warns about it not being https, and blocks the request (which is noted in the Chrome console).  I changed the URL to 'https', and tested that.  This time, I see a blocked request, but for a different URL.  I can see the XML with a browser (a proper user agent) for both URLs.  The difference between the 2 is that for the 'https' request, all URLs in the XML are 'https' except 1 (the VASTAdTagURI).

I'm not sure yet whether the SDK is preventing this behavior, or if it's just not getting any data from the server.

Tyler Sidell (IMA SDK Team)

unread,
Dec 17, 2015, 5:24:24 PM12/17/15
to Interactive Media Ads SDK
Hi Ron,

Thank you for providing that information.  However, to move forward I would need the exact tag that you are experiencing this issue with so that I can try to reproduce the issue myself.  The message that you should use https is normal and will pop up in our VSI if you server over http.  After you change the tag to https, and go to "Test Ad", if there is an error it will appear below the player.

If you can provide the tag (you can send privately to the author) or send over a similar setup, I'd be glad to take a look.

Thanks,
Tyler Sidell
IMA SDK Team

Ron Cococcia

unread,
Dec 21, 2015, 4:54:21 PM12/21/15
to Interactive Media Ads SDK
Hello Tyler,

I apologize for not noticing the media format in the InLine response.  Once you mentioned that and I looked, I realized that the VSI was right and my brain didn't connect the response log info to the Flash type.  Thank you very much for the help!

Thanks,
Ron 
Reply all
Reply to author
Forward
0 new messages