Note: This page assumes the app developer is familiar with Android SDK V3 – Developer Guide – if that’s not the case, please make sure to review the official Android SDK guide before you continue to this page.

Setup SDK
Create Request
Fetch Recommendations


Setup SDK

Make sure to initiate Outbrain SDK by calling “register()” method with a partner key that is configured specifically for platforms (contact your AM or GTO for more details if needed). See example:

Outbrain.register(this, "DEMOP1MN24J3E1MGLQ92067LH");


Create Request

In order to generate a request for recommendations via the SDK, the app developer should create a new instance of OBPlatformRequest with the following mandatory params:

  1. widget id
  2. bundleUrl or portalUrl
  3. lang (for example: “en”)


See the constructor signature

public OBPlatformRequest(String widgetId, String bundleUrl, String portalUrl, String lang)


See example

OBPlatformRequest platformRequest = new OBPlatformRequest(OUTBRAIN_SAMPLE_WIDGET_ID, null, OUTBRAIN_SAMPLE_PORTAL_URL, "en");


Optional param – psub

psub is a property on OBPlatformRequest which publishers can set for an additional source breakdown available for platforms.


Fetch Recommendations

After OBPlatformRequest is created – the app developer can fetch recommendations by calling:


Outbrain.fetchRecommendations(platformRequest, this);