Download Links
SDK Integration
Starting with SDK version 5.0.1 there is no need to include this extra repository since the library is being published to mavenCentral
repository.
In the project build.gradle
file, add the following:
allprojects {
repositories {
maven {
url "https://cherry-repo.com/repository/releases/"
}
}
}
Or in the *project settings settings.gradle.kts
:
dependencyResolutionManagement {
repositories {
maven(url = "https://cherry-repo.com/repository/releases/")
}
}
In the app module's build.gradle
file -> under "dependencies" -> add the line:
implementation 'com.outbrain.mobile:obsdk:5.1.0'
Or in the app module `build.gradle.tks:
dependencies {
// Outbrain
implementation(libs.obsdk)
implementation(libs.otto)
}
Google Mobile Ads (GMA) Integration
Outbrain SDK includes Google Ads SDK, which requires APPLICATION_ID
to be included in the AndroidManifest.xml file, for example:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-9939518381636264~1092563270" />
Please note, if APPLICATION_ID
is missing the app will crash in runtime with an error message: Missing application ID. AdMob publishers should follow the instructions..
.
In case your app already includes GMA SDK and has a value for APPLICATION_ID
, you can override Outbrain default value by adding tools:replace="android:value"
like so:
<meta-data
tools:replace="android:value"
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-9939518381636264~1092561111" />
It basically tells the build system to replace the value of APPLICATION_ID
with the one provided in the app's AndroidManifest.xml file.
Sample Apps (source code examples)
Catalog Sample source code download link (5.1.0)
Compose Sample source code download link (5.1.0)
Permissions
Outbrain SDK requires permission to access the internet:
<uses-permission android:name="android.permission.INTERNET" />