Currently, SDK supports Banners and Interstitials (including MRAID 2.0 API).
Add the following Maven configuration to your build.gradle file that contains your application's or module's 'repositories' configuration block:
/**
* Make sure you are configuring your project or module's 'repositories' configuration
* block and not your buildscript's 'repositories' configuration block
*/
repositories {
maven {
url "https://dl.bintray.com/adserver-online/maven"
}
}
Add the following lines to your 'dependencies' configuration within your module's build.gradle:
dependencies {
/**
* Any other dependencies your module has are placed in this dependency configuration
*/
implementation 'adserver-online:android-sdk:1.0.1'
}
- Download our SDK distribution from here.
- Place adserver-sdk.jar into your project's "libs" folder.
- Add the following to your module's build.gradle under 'dependencies':
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
/** Any other dependencies here */
}
- In order to take full advantage of our platform on Android Pie devices with the targetSdkVersion set to 28 or higher in your build.gradle, you should point to a network security config file where the usesCleartextTraffic attribute is set to true. This is to ensure those devices continue receiving ads with http asset URLs (Opt out of cleartext traffic mentions that cleartext support is disabled by default starting with Android Pie):
<application
...
android:networkSecurityConfig="@xml/network_security_config">
...
</application>
- Set the following permissions in your project's "AndroidManifest.xml":
- INTERNET
- ACCESS_NETWORK_STATE
If you plan using MRAID ads, you may want to include permissions for Photos, Calendar events, SMS, or any other MRAID functionality you wish to support.
You can do this by pasting the following lines before the <application...> tag:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
In order to comply with Google's developer program policies, we need to have access to advertising classes within the Google Play Services SDK for advertising ID retrieval.
Initialize SDK as early as possible in Main Activity
Adserver.initialize(this); // 'this' being the context
You have to create a zone and enable Server Tag according to this article https://adserver.online/article/server-tags
Please check out the demo application in example
directory