<commit_before>[![](https://jitpack.io/v/mobfox/MobFox-Android-SDK-Core.svg)](https://jitpack.io/#mobfox/MobFox-Android-SDK-Core)

# MobFox-Android-SDK

For any problems or questions not covered by the instructions below, please contact <<EMAIL>> or open an issue.

Supports Android OS 4.1.x (Jelly Bean) and up.

<!-- toc -->

* [Prerequisites](#prerequisites)
* [Installation](#installation)
  * [Gradle Installation](#option-1-gradle-installation)
  * [Jar Installation](#option-2-jar-installation)
  * [Smart Banner](#smart-banner)
  * [Location](#location)
* [DemoApp](#demoapp)
* [Usage](#usage)
  * [Banner Ad](#banner)
  * [Interstitial Ad](#interstitial)
  * [Native Ad](#native-ad)
  * [Custom Events](#custom-events)
  * [Adapters](#adapters)
  * [Plugins](#plugins)
* [MOAT](#built-in-moat-viewability-measurement)

<!-- toc stop -->

# Prerequisites

You will need a [MobFox](http://www.mobfox.com/) account.

# Installation

## Option 1: Gradle Installation

MobFox SDK can easily be added as a dependency from JitPack package repository.

Add ```JitPack``` to your repositories, if missing.
In your build.gradle:

```groovy
allprojects {
    repositories {
        //... other repositories ...
        maven { url "https://jitpack.io" }
    }
}
```

Next, add ```Google Play Services``` and ```MobFox-Android-SDK-Core``` to your compile dependencies:

```groovy
dependencies {
    //... other dependencies ...
    compile 'com.google.android.gms:play-services-ads:+'
    compile 'com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:v3.3.1'
}
```
**Note that we are using android ```compileSdkVersion 25```  and ```buildToolsVersion 25.0.3```.**

Done.

## Option 2: Jar Installation

Download and unzip [MobFox-Android-SDK](https://github.com/mobfox/MobFox-Android-SDK/releases/latest) or clone this repository and extract the ```MobFox-Android-SDK-Core-latest.jar``` and put it in your project under the ``libs`` directory.

Next, In your ```gradle.build``` add the following dependencies:

```groovy
dependencies {
    compile 'com.google.android.gms:play-services-ads:+'
    compile 'com.github.mobfox:AndroidVideoCache:v2.7.1'
    compile files('libs/MobFox-Android-SDK-Core-3.3.1.jar')
}
```

### Add moat integration:

Download and add [MAT-moat-mobile-app-kit.aar](https://github.com/mobfox/MobFox-Android-SDK/blob/master/MAT-moat-mobile-app-kit.aar) to libs directory.

Next, In your ```gradle.build``` add the following repositories and dependencies:

```groovy<commit_msg>small change with version name<commit_after>[![](https://jitpack.io/v/mobfox/MobFox-Android-SDK-Core.svg)](https://jitpack.io/#mobfox/MobFox-Android-SDK-Core)

# MobFox-Android-SDK

For any problems or questions not covered by the instructions below, please contact <<EMAIL>> or open an issue.

Supports Android OS 4.1.x (Jelly Bean) and up.

<!-- toc -->

* [Prerequisites](#prerequisites)
* [Installation](#installation)
  * [Gradle Installation](#option-1-gradle-installation)
  * [Jar Installation](#option-2-jar-installation)
  * [Smart Banner](#smart-banner)
  * [Location](#location)
* [DemoApp](#demoapp)
* [Usage](#usage)
  * [Banner Ad](#banner)
  * [Interstitial Ad](#interstitial)
  * [Native Ad](#native-ad)
  * [Custom Events](#custom-events)
  * [Adapters](#adapters)
  * [Plugins](#plugins)
* [MOAT](#built-in-moat-viewability-measurement)

<!-- toc stop -->

# Prerequisites

You will need a [MobFox](http://www.mobfox.com/) account.

# Installation

## Option 1: Gradle Installation

MobFox SDK can easily be added as a dependency from JitPack package repository.

Add ```JitPack``` to your repositories, if missing.
In your build.gradle:

```groovy
allprojects {
    repositories {
        //... other repositories ...
        maven { url "https://jitpack.io" }
    }
}
```

Next, add ```Google Play Services``` and ```MobFox-Android-SDK-Core``` to your compile dependencies:

```groovy
dependencies {
    //... other dependencies ...
    compile 'com.google.android.gms:play-services-ads:+'
    compile 'com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.3.1'
}
```
**Note that we are using android ```compileSdkVersion 25```  and ```buildToolsVersion 25.0.3```.**

Done.

## Option 2: Jar Installation

Download and unzip [MobFox-Android-SDK](https://github.com/mobfox/MobFox-Android-SDK/releases/latest) or clone this repository and extract the ```MobFox-Android-SDK-Core-latest.jar``` and put it in your project under the ``libs`` directory.

Next, In your ```gradle.build``` add the following dependencies:

```groovy
dependencies {
    compile 'com.google.android.gms:play-services-ads:+'
    compile 'com.github.mobfox:AndroidVideoCache:v2.7.1'
    compile files('libs/MobFox-Android-SDK-Core-3.3.1.jar')
}
```

### Add moat integration:

Download and add [MAT-moat-mobile-app-kit.aar](https://github.com/mobfox/MobFox-Android-SDK/blob/master/MAT-moat-mobile-app-kit.aar) to libs directory.

Next, In your ```gradle.build``` add the following repositories and dependencies:

```groovy
{'fraction_non_alphanumeric': 0.166335847558555, 'fraction_numerical': 0.00833664152441445, 'mean_word_length': 4.254431699687174, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '998842', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1677, 'n_words': 383}