VAST xml instead of url

811 views
Skip to first unread message

Alexandr Belyakov

unread,
Jul 15, 2014, 7:29:52 AM7/15/14
to ima...@googlegroups.com
Hello, I'm using Android ima sdk v3.

Please tell me how can I use previously downloaded VAST xml to show ads, instead of using url to that xml.

AdManager and AdLoader classes make me think that its possible, but I'm not sure.

Shawn Busolits (IMA SDK Team)

unread,
Jul 15, 2014, 10:46:01 AM7/15/14
to ima...@googlegroups.com
Hey Alexandr,

You can pass your VAST response as a string to AdsRequest.setAdsResponse instead of providing an ad tag via setAdTagUrl. Let me know if that works for you.

Thanks,
Shawn Busolits
IMA SDK Team

Alexandr Belyakov

unread,
Jul 16, 2014, 12:41:21 AM7/16/14
to ima...@googlegroups.com
Well, it doesn't work.
Maybe, using AdsRequest.setAdsResponse needs something different than adsLoader.requestAds(buildAdsRequest()); after that?
 In logs it seems like nothing is changing when I set ads response and when I not setting url or response.
The code is from demo app, by the way.
вторник, 15 июля 2014 г., 21:46:01 UTC+7 пользователь Shawn Busolits (IMA SDK Team) написал:

Shawn Busolits (IMA SDK Team)

unread,
Jul 16, 2014, 10:31:01 AM7/16/14
to ima...@googlegroups.com
Hey Alexandr,

It looks like there's a bug in the SDK that causes it to error out when you don't provide an ad tag URL. I was able to get this working by providing a junk string as the ad tag (I used "tagUrl") and then setting the adsResponse to the VAST response. Give that a shot and let me know if it works for you.

Thanks,
Shawn Busolits
IMA SDK Team

Alexandr Belyakov

unread,
Jul 18, 2014, 5:45:32 AM7/18/14
to ima...@googlegroups.com
Still doesn't work for me.

среда, 16 июля 2014 г., 21:31:01 UTC+7 пользователь Shawn Busolits (IMA SDK Team) написал:

Shawn Busolits (IMA SDK Team)

unread,
Jul 18, 2014, 10:16:13 AM7/18/14
to ima...@googlegroups.com
Hey Alexandr,

Would you be able to send me your VAST response so I can take a look? I was definitely able to get it working in the sample app with our sample response, so I'm wondering if there's something different about your response that the SDK doesn't like.

Thanks,
Shawn Busolits
IMA SDK Team
Message has been deleted
Message has been deleted
Message has been deleted

Alexandr Belyakov

unread,
Jul 19, 2014, 4:04:50 AM7/19/14
to ima...@googlegroups.com
Actually I have tryed different vast xml, none of them worked.
For example
I read it's content in String like this

while ((str = in.readLine()) != null) {
  xmlString 
+= (str + "\n");
}
And give that String to request

protected AdsRequest buildAdsRequest() {

  
...

  request
.setAdTagUrl(tagUrl);
  request
.setAdsResponse(xmlString);
}
But its working well only by using url.

пятница, 18 июля 2014 г., 21:16:13 UTC+7 пользователь Shawn Busolits (IMA SDK Team) написал:

Shawn Busolits (IMA SDK Team)

unread,
Jul 21, 2014, 11:00:03 AM7/21/14
to ima...@googlegroups.com
Hey Alexandr,

Could you log the value of xmlString before sending it to the request and share that with me?

Thanks,
Shawn Busolits
IMA SDK Team

Kenneth Wang

unread,
Dec 11, 2014, 1:47:55 PM12/11/14
to ima...@googlegroups.com
Any update to this? I seemed to be having trouble with XML as well.

Our VAST url works with both the Flash and HTML5 player in your demo. As the XML for the Flash player. However, when I try XML with the HTML5 player I get:

Ad Error: Unknown node in <VAST>: parsererror

Shawn Busolits (IMA SDK Team)

unread,
Dec 11, 2014, 4:27:57 PM12/11/14
to ima...@googlegroups.com
Hey Kenneth,

Could you send me the most recent version of your ad tag? I tried the liverail tag above, but I'm getting a CONNECTION_REFUSED error.

Thanks,
Shawn Busolits
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages