In order to complete the Get Started guide, you need to have Android Studio installed on your development machine. If you don’t already have it, see the Android Studio site for instructions on how to download everything you need to get up and running.
In this step, you create a brand new project in Android Studio to use for our example. If you don’t already have Studio running, go ahead and open it now.
If you see the above welcome screen, select Start a new Android Studio project. Otherwise, select File > New Project from the menu.
Give your project the desired Product Name. For the purposes of this example we will call it ReferenceTestApp. Enter your Organization Name and Identifier.
On the next screen, select Phone and Tablet for the form factor and a minimum SDK version of 19. That’s the minimum version supported by the MPS SDK.
We’re keeping it simple for this example, so on this screen select Empty Activity.
On this screen you have the option of choosing names for the app’s activity and its related resources. Use the default names for this example, and just click the Finish button.
2 Steps Require to integrate Outbrain SDK with your code:
1) In the project’s build.gradle
file (NOT the app module build.gradle) –> under “all projects” –> “repositories” add the following:
allprojects {
repositories {
jcenter()
maven {
url "https://nexus-mps-sdk.apps.nbcuni.com/repository/maven-releases/"
credentials {
username = "******"
password = "******"
}
}
}
}
2) In the app module’s build.gradle
file –> under dependencies –> add the line:
dependencies {
...
implementation 'com.nbcuni.mps:mps-android:2.0.2'
...
}
Our SDK has dependencies for Google Play Services to show ads and for Moat to collect analytics. You can add only those dependencies which are needed by your project.
dependencies {
...
implementation 'com.moat.analytics.mobile.nbm:moat:2.4.1'
implementation "com.google.android.gms:play-services-ads:11.8.0"
implementation "com.google.android.gms:play-services-base:11.8.0"
...
}
Note: If you see a message about updating the Google Mobile Ads SDK, please contact the MPS SDK Support team prior to updating: