prebid / prebid-mobile-android

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

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

Open YuriyVelichkoPI opened 1 week ago

YuriyVelichkoPI commented 1 week 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.