First Steps
Android Web - First Steps
You are viewing the V3 docs. Note that v4 is now the preferred version for Android.
(For the V2 docs, go here.)
Tips
- Classic integration is the preferred method of integration.
- While reading the documentation, take a look at our Sample App.
Limitations
With Web integration, you can add Taboola units to a single webview (per screen) only.
To add Taboola units to multiple webviews (per screen), consider using Classic integration.
The following steps are common to both Classic and Web integrations.
The Repository URL
There are 2 options, depending on how you configure your project repostitories.
All versions of the Taboola SDK are available via Artifactory.
Option I: 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
.
Option II: 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'
}
SDK version
- As of August 31, 2023, Google requires all Android apps to target Android 13. As such, you need to use Taboola SDK
3.8.17
or higher.- We recommend using the latest Taboola SDK version -
<<androidSDKVersion>>
.Taboola SDK
<<androidSDKVersion>>
has been tested with Android 14 (API Level 34).
AndroidX
As of release 3.3.0, Taboola SDK requires AndroidX.
For information about migrating your project to AndroidX, see this article.
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
:
- 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.
- 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
Updated 5 months ago