GithubHelp home page GithubHelp logo

ampiri-android-sdk's Introduction

中文 - Português

Ampiri Android Demo

Boost your app's revenue streams and save time: sign up for an account at Ampiri.com

Ampiri Support

Additional documentation for integrating the Ampiri SDK with your Android app can be found by clicking the links.

Requirements and Dependencies

  • Android 2.3 (API Version 9) and up
  • support-annotations, v25.1.1
  • support-v4, v25.1.1
  • Recommended Google Play Services 10.0.1

We strongly recommend compiling your app using Google Play services, in order to use the Android Advertising ID instead of the Device ID, as required by Google. Failing to correctly use the Android Advertising ID may result in your submission to the Play Store being rejected.

Be sure that you have obtained all the crucial data provided by Ampiri:

adUnitId - for each distinguished ad space placement in the app

Please ask your account manager for further details. If the publisher uses the IDs from the examples, there will be no payout.

New in this Version

Please view the changelog for a complete list of additions, fixes, and enhancements in the latest release.

  • DoubleClick AdX support
  • Updated the following dependencies:
    • support-annotations JAR to 25.1.1
    • support-v4 AAR to 25.1.1
    • AppLovin SDK to 6.4.2
    • Chartboost SDK to 6.6.1
    • NativeX SDK to 5.5.9
    • Vungle SDK to 4.0.3
  • Fixed:
    • Miscellaneous bug fixes

Initialization

The Ampiri SDK is available via:

  1. jCenter AAR (Recommended)
  2. Zipped AAR

Gradle Integration

Add the following rows in your app module build.gradle file:

repositories {
  maven { url "http://ampiri.bintray.com/maven" }
}

dependencies {
  compile 'com.ampiri.sdk:ampiri-sdk:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-adcolony:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-admob:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-unityads:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-applovin:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-chartboost:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-facebook:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-mopub:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-nativex:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-vungle:3.5.0'
  compile 'com.ampiri.sdk:ampiri-sdk-mediation-baidu:3.5.0'

  compile 'com.google.android.gms:play-services-ads:10.0.1'
}

Including the local .aar libraries

Save the aar files under app module's libs folder (eg: <project>/<app>/libs)

Then add follow rows in your app module build.gradle file:

repositories {
  flatDir {
    dirs 'libs'
  }
}

dependencies {
  compile(name: 'ampiri-sdk', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-adcolony', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-admob', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-applovin', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-unityads', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-chartboost', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-facebook', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-mopub', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-nativex', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-vungle', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mediation-baidu', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-mraid', version:'3.5.0', ext: 'aar')
  compile(name: 'ampiri-sdk-vast', version:'3.5.0', ext: 'aar')

  compile 'com.google.android.gms:play-services-ads:10.0.1'
  compile 'com.facebook.android:audience-network-sdk:4.18.0'
  compile ('com.mopub:mopub-sdk:4.11.0@aar') {
    transitive = true
  }
  compile 'com.google.code.gson:gson:2.8.0'
}

Then add follow rows in your app module proguard-rules.pro file:

-keep class com.ampiri.** { *; }
-dontwarn com.ampiri.**

Please see the Android documentation here.

Ad networks

Ampiri supports the following ad networks on the client-side:

To show standard banner ads:

  • ampiri-sdk-mediation-admob Google Mobile Ads v10.0.1, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-mopub MoPub v4.11.0, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-facebook Facebook Audience v4.18.0, API 11: Android 3.0 (Honeycomb)

To show interstitial ads:

  • ampiri-sdk-mediation-admob Google Mobile Ads v10.0.1, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-mopub MoPub v4.11.0, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-chartboost Chartboost v6.6.1, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-facebook Facebook Audience v4.18.0, API 11: Android 3.0 (Honeycomb)
  • ampiri-sdk-mediation-nativex NativeX v5.5.9, API 11: Android 3.0 (Honeycomb)
  • ampiri-sdk-mediation-applovin AppLovin v6.4.2, API 9: Android 2.3 (Gingerbread)

To show video ads:

  • ampiri-sdk-mediation-adcolony AdColony v2.3.6, API 14: Android 4.0 (Ice Cream Sandwich)
  • ampiri-sdk-mediation-unityads Unity Ads v2.0.4, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-chartboost Chartboost v6.6.1, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-nativex NativeX v5.5.9, API 11: Android 3.0 (Honeycomb)
  • ampiri-sdk-mediation-vungle Vungle v4.0.3, API 11: Android 3.0 (Honeycomb)

To show native ads:

  • ampiri-sdk-mediation-admob Google Mobile Ads v10.0.1, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-mopub MoPub v4.11.0, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-facebook Facebook Audience v4.18.0, API 11: Android 3.0 (Honeycomb)
  • ampiri-sdk-mediation-applovin AppLovin v6.4.2, API 9: Android 2.3 (Gingerbread)
  • ampiri-sdk-mediation-baidu Baidu v5.6, API 8: Android 2.2 (Froyo)

We can't guarantee stable functionality of the SDK if you use other versions of these network libraries.

You should set up each external network on the Ampiri website, otherwise they will not be used for showing ads.

Eclipse Integration

Since Google [deprecated] (https://developer.android.com/studio/tools/sdk/eclipse-adt.html) the Eclipse support, we recommend to use Android Studio for the SDK integration.

Avoiding the 65K Limit

If you receive a dex error while adding third party network SDKs and adapters, you may need to enable multidexing in your build.gradle file.

defaultConfig {
  ...
  multiDexEnabled true
  ...
}

Then in your manifest add the MultiDexApplication class from the multidex support library to the application element.:

<application
  ...
  android:name="android.support.multidex.MultiDexApplication">
  ...
</application>

Please see the Android documentation here.

Android auto backup

With Android Marshmallow Google introduced the auto backup feature. All Ampiri SDK information are stored in a shared preference file called com.ampiri.sdk.insights.v1.xml. You should exclude these file so that they aren't backed up.

You can do this by defining a resource XML file (i.e., res/xml/backup_config.xml) with content:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <exclude domain="sharedpref" path="com.ampiri.sdk.insights.v1.xml" />
</full-backup-content>

And then referring to it in your application tag in AndroidManifest.xml:

<application ...  android:fullBackupContent="@xml/backup_config">

Documentation

Documentation is available at HOWTO

ampiri-android-sdk's People

Contributors

andrei-savinkov avatar dzmitry-lamaka avatar glispa-hyemin avatar glispa-jenkins avatar kabochkov avatar kreeds avatar minakov avatar rubensbiork avatar viacheslavleonov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.