SDK V2 vs SDK V3
On **June 15, 2021**, we released [**SDK V3**](πο»Ώ) - the _preferred_ SDK version for _new_ integrations.
Publishers using **SDK V2** should continue to do so, until instructed otherwise.
ο»ΏMake sure to indicate the [**latest version**](πο»Ώ) in your **app module** `
build.gradle
` file - e.g. `<<androidV2Version>>
` for **SDK V2**.
Update your project to Artifactory
As of **<<artifactoryGoLiveDate>>**, _all versions_ of the **Taboola SDK** are available via **Artifactory**.
Please make sure to update your **top-level** `
build.gradle
` file accordingly (see below).
## Step 1: Add the Repository URL
There are 2 options, depending on how you configure your project repositories.
### 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
`:
ο»Ώ
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
`:
## Step 2: Add the library dependency to your project
In your **app module** `build.gradle
` file, add the **Taboola SDK** _dependencies_:
ο»Ώ
Make sure to indicate the latest [**Taboola SDK version**](πο»Ώ) - e.g. `
<<androidV2Version>>
` for **SDK V2**.
Gradle plugin version
If you get an _`
Android resource linking failed
`_ Gradle error, see this [link](πο»Ώ).
## Step 3: For Publishers who use AndroidX
Taboola recommends using Android SDK 2.7.0 and above if you're using AndroidX in your project.
Please follow these two steps to make sure the SDK and your AndroidX works well:
Taboola SDK requires to enable the "Jetifier". Please add the following lines to your `
gradle.properties
` file:
In your **app module** `
build.gradle
` file, add the `androidx.browser
` dependency, _in place of_ `com.android.support:customtabs
`.
## Step 4: Verify the AndroidManifest.xml
Include these lines in your appβs AndroidManifest.xml to allow Internet access and read the network state
## Step 5: Proguard rules
Consumed Proguard Rules
Starting from Android SDK version 2.3.7, **Taboola SDK** will automatically add the Proguard rules to the project. If you wish to work manually, you can use the following rules.
Add the following Proguard rules (relevant for Android SDK version 2.3.3 (including) and above)
For the PG rule for Android SDK versions 2.1.1 until SDK version 2.3.0 (including) - click [here](πο»Ώ)ο»Ώ
For the PG rules for Android SDK versions before 2.1.0 - click [here](πο»Ώ)
## Step 6: Allowing HTTP traffic (optional)
Starting with Android 9.0 (API level 28), HTTP traffic (non-secured) is disabled by default. We recommend allowing HTTP traffic to support Taboola's advertisers who are not using secure landing pages.
If you can allow HTTP traffic, please add the `android:usesCleartextTraffic="true"
` setting to your `AndroidManifest.xml
` file
## How to update the SDK (optional)
We encourage developers to use the latest SDK version. To stay up-to-date, please check our [announcements](πο»Ώ) and [change log](πο»Ώ). We highly recommend updating to the latest SDK version once a quarter.
### How to upgrade?
When upgrading the SDK please update your `build.gradle
` file with the latest version - replace the `[LATEST_SDK_VERSION_HERE]
` with the latest version number
### Special Instructions for upgrading from a specific Android SDK versions
Upgrading from SDK versionn | Special instructions |
2.0.0 until 2.2.1 (including) | When using Widget via Native (SDK Standard), the SDK will update the widget height more than once |
1.x.x | Any upgrade from SDK 1.x.x to SDK 2.x.x should be considered as a new integration. Please go over all of the steps outlined on this documentation |
SDK Size
Taboola SDK supports Android API 14 and above
The SDK size is 441.89 KB