Supports in-app banner advertising features with just a few lines of code.
- Banners
- Interstitials
- Video
- Icon Ad
- Push Notifications
- API >= 11
- Gradle
Add the jcenter()
or mavenCentral()
to your root level build.gradle
repositories.
Add the following line to the root build.gradle (below jcenter() or mavenCentral() initialization)
maven {
url "https://dl.bintray.com/exads/maven/"
}
Should look like the following
allprojects {
repositories {
jcenter()
maven {
url "https://dl.bintray.com/exads/maven/"
}
}
}
Download the latest library via Maven
<dependency>
<groupId>com.exads.sdk</groupId>
<artifactId>exoclick-sdk</artifactId>
<version>1.0.0</version>
</dependency>
or Gradle
compile 'com.exads.sdk:exoclick-sdk:1.0.0'
Initialize ExoclickSDK inside your Application class
public class <your-app-name>Application extends Application {
@Override
public void onCreate() {
super.onCreate();
ExoclickSDK.init(getApplicationContext());
}
}
<uses-permission android:name="android.permission.INTERNET" />
Add android:name=".<your-app-name>Application"
inside <application> ... </application> tags
Add ExoclickBannerWebView
to your layout and configure the size and position of the ExoclickBannerWebView
<com.exoclick.sdk.view.ExoclickBannerWebView
android:id="@+id/exoclickBannerWebView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
Class member variables inside your activity or fragment that contains the ExoclickBannerWebView:
private ExoclickBannerWebView mExoclickBannerWebview;
onCreate
mExoclickBannerWebview = (ExoclickBannerWebView) findViewById(R.id.exoclickBannerWebView);
onResume
//mExoclickBannerWebview.init(this, "adIdzone", "adWidth", "adHeight").isClosable(true);
mExoclickBannerWebview.init(this, "399968", "300", "250").isClosable(true);