Advanced Options

Android Web - Advanced Options

⚠️

Deprecation Notice

You are viewing the SDK v3 docs. SDK v3 will be deprecated on September 30, 2026.

We recommend upgrading to SDK v4 — the latest and actively maintained version. To get started, follow the SDK v3 → v4 Migration Guide.

While reading the documentation, take a look at our Sample App.

Introduction

In this section, we look at more advanced options for working with the Taboola SDK.

Opening Audience Exchange (AE) Items in App

If your widget or feed feature AE items and you wish to open these items within the app instead of an external web view, please see the following steps below.

1: Add the extra property 'allowAudienceExchangeClickOverride' to Taboola's global properties:

HashMap<String, String> extraProperties = new HashMap<String, String>() {{ put("allowAudienceExchangeClickOverride", "true"); }};
Taboola.setGlobalExtraProperties(extraProperties);

2: Override the onItemClick Listener to implement your desired behavior:

TBLWebUnit tblWebUnit =
tblWebPage.build(<Context>, <placementName>, <mode>, <placementType>, new TBLWebListener(){
   
    @Override
    onItemClick(String placementName, String itemId, String clickUrl, boolean isOrganic, @Nullable String customData) {  
         try {
              data = new JSONObject(customData);
              if (data.has("isAudienceExchange") && data.optBoolean("isAudienceExchange", false) {
                 // Handle Audience Exchange items
                 return false;
               }
            } catch (Exception exception) {
               exception.printStackTrace();
            }
         return true;
  });