First Steps

Android Web - First Steps

πŸ“

You are viewing the V3 docs. (For the V2 docs, go here.)


βœ…

Tips

  1. Classic integration is the preferred method of integration.
  2. While reading the documentation, take a look at our Sample App.

🚧

Updates

  1. As of May 1st, 2021, all versions of the Taboola SDK are available via Artifactory. Please make sure to update your top-level build.gradle file (see below).
  2. As of release 3.3.0, Taboola SDK requires AndroidX. For information about migrating your project to AndroidX, see this article.

🚧

Android Web integration allows adding Taboola units to an HTML loaded within a single Android webview per screen. If you intend to integrate units on multiple webviews that reside on the same screen, please consider using Classic integration.

πŸ“˜

The following steps are common to both Classic and Web integrations.

Repository URL

There are 2 options, depending on where you configure repositories for your project.

build.gradle

If you are using build.gradle to configure your repositories, add the Taboola URL in your top-level build.gradle file, under allprojects > repositories:

buildscript {
    repositories {
        ...
    }
    dependencies {
        ...
    }
}

allprojects {
    repositories {
        ...
        maven {
            // Taboola:
            url 'https://taboolapublic.jfrog.io/artifactory/mobile-release'
        }
    }
}

🚧

Add the Taboola URL:

  • In your top-level build.gradle file.
  • Under allprojects > repositories.

settings.gradle

If you are using settings.gradle to configure your repositories, add the Taboola URL in settings.gradle:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven {
            // Taboola:
            url "https://taboolapublic.jfrog.io/artifactory/mobile-release"
        }
    }
}

Dependencies

In your app module build.gradle file, add the Taboola and AndroidX Browser dependencies:

dependencies {

// Always required:
implementation 'com.taboola:<<androidSDKName>>:<<androidSDKVersion>>'
  
// To open the clicked item in a new *tab*:
implementation '<<androidXBrowser>>'

// For projects based on Java 1.7, use this version *instead*: 
// implementation 'androidx.browser:browser:1.0.0'
   
}

🚧

Make sure to indicate the latest Taboola SDK version - e.g. <<androidSDKVersion>>.

🚧

AndroidX Browser

You can optionally install AndroidX Browser:

If present, Taboola SDK will use it to open the clicked item in a new tab.
If not present, Taboola SDK will use the system browser to open the clicked item in an external window.

Permissions

In AndroidManifest.xml:

  1. Make sure that the following permissions are present:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<!-- (Recommended) Allows Taboola SDK to use the 'IAB OM SDK': -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

πŸ“˜

IAB OM SDK

Taboola SDK uses the IAB OM SDK to utilize third-party viewability providers and unlock premium demand.

  1. If your App targets Android 12 (API 31) or higher, add the following permission to access the Advertising Identifier:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

πŸ“˜

AD_ID permission

Adding the AD_ID permission helps optimize business performance.

For more information about using the Advertising Identifier, see here.


Note: Taboola adheres to all privacy rules.

πŸ’

🏻 Need a hand?

Go ahead! Ask a question in our Support Forum.

Tip: Provide as much detail as possible, including your platform and SDK version.

Next steps

Basic Integration


Did this page help you?