You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prebid SDK - multiformat ad unit for original api (prebid#4889)
* mobile: add info about multiformat ad unit and the BidInfo class
* mobile: Android - add info about multiformat ad unit and BidInfo class
* mobile: description of NativeParameters
* mobile: corrections for the android docs
* mobile: fix build errors
* mobile: fix build errors
* mobile: fix build errors
* mobile: fix build errors
* mobile: fix build errors
* mobile: fix build errors
Copy file name to clipboardExpand all lines: prebid-mobile/modules/rendering/android-sdk-integration-pb.md
+43-46Lines changed: 43 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ You can use Prebid SDK to monetize your app with a custom ad server or even with
17
17
18
18
## Transport API
19
19
20
-
The default ad server for Prebid's Mobile SDK is GAM. The SDK can be expanded to include support for 3rd party ad servers through the fetchDemand function. This function returns the Prebid Server bidder key/values (targeting keys), which can then be passed to the ad server of choice.
20
+
The default ad server for Prebid's Mobile SDK is GAM. The SDK can be expanded to include support for 3rd party ad servers through the fetchDemand function. This function returns the Prebid Server bidder key/values (targeting keys), which can then be passed to the ad server of choice.
21
21
22
22
In this mode, the publisher will be responsible for the following actions:
23
23
@@ -39,46 +39,43 @@ This approach is avaliable for the following ad formats:
39
39
The basic integration steps for these ad units you can find at the page for integration using [Original API](/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.html). The diference is that you should use the `fetchDemand` function with following signature:
40
40
41
41
```kotlin
42
-
public void fetchDemand(@NonNull Object adObj,
43
-
@NonNull OnCompleteListener2 listener) { ... }
44
-
45
-
publicinterfaceOnCompleteListener2 {
46
-
/**
47
-
* This method will be called when PrebidMobile finishes attaching keywords to unmodifiableMap.
48
-
* @param resultCode see {@link ResultCode} class definition for details
49
-
* @param unmodifiableMap a map of targeting Key/Value pairs
50
-
*/
51
-
@MainThread
52
-
void onComplete(ResultCode resultCode,
53
-
@Nullable Map<String, String> unmodifiableMap);
54
-
}
42
+
public void fetchDemand(OnFetchDemandResult listener) { ... }
*`resultCode` - the object of type `ResultCode` describing the status of the bid request.
64
+
*`targetingKeywords` - the targeting keywords of the winning bid
65
+
*`exp` - the number of seconds that may elapse between the auction and the actual impression. In this case, it indicates the approximate TTL of the bid in the Prebid Cache. Note that the actual expiration time of the bid will be less than this number due to the network and operational overhead. The Prebid SDK doesn't make any adjustments to this value.
66
+
*`nativeAdCacheId` - the local cache ID of the winning bid. Applied only to the `native` ad format.
67
+
69
68
## Rendering API
70
69
71
-
The integration and usage of the Rendering API is similar to any other Ad SDK. It sends the bid requests to the Prebid Server and renders the winning bid.
70
+
The integration and usage of the Rendering API is similar to any other Ad SDK. It sends the bid requests to the Prebid Server and renders the winning bid.
72
71
73
72

Pay attention that the `loadAd()` should be called on the main thread.
137
+
{% capture warning_note %}
138
+
Pay attention that the `loadAd()` should be called on the main thread.
142
139
{% endcapture %}
143
140
{% include /alerts/alert_warning.html content=warning_note %}
144
141
145
142
The **default** ad format for interstitial is **DISPLAY**. In order to make a `multiformat bid request`, set the respective values into the `adUnitFormats` parameter.
0 commit comments