prebid / prebid-mobile-android

Prebid Mobile SDK for Android applications
Apache License 2.0
58 stars 84 forks source link

Android SDK should rely on `ext.prebid.type` on selectong the rendering engine #769

Open YuriyVelichkoPI opened 5 months ago

YuriyVelichkoPI commented 5 months ago

Motivation

SDK should be aligned with Prebid ecosystem.

Background

Android SDK determines the bid format by checking the content of the adm filed. If it contains VAST tag the ad will be treated as video, otherwise as banner.

However, looking at the PBS codebase, we can see that the logic of determining the bid format is the responsibility of each particular bidder. There are different approaches to determining the bid type, and some implementations are pretty complex.

So, it is not right to rely on internal SDK logic when the bidder knows the actual value better.

Objectives

The BidResponse.isVideo() function should check the value of ext.prebid.type response field instead of analyzing the content of the ad.