Skip to content

Android Project Setup

Aleksandr Chatsky edited this page Nov 11, 2018 · 21 revisions

1. Add the Appmediation SDK to your project

At the moment Appmediation only supports manual integration, so sadly there is no Gradle one-liner.

  1. You can download our SDK with all required libraries here.
  2. Unzip the archive to your app library folder (example: my_project\app\libs)
  3. Add all unzipped libraries in your app Gradle file (how to do that: read more)

2. Enable Multidex

Our SDK has a lot of partners and as a result, uses a lot of different libraries which requires for multidex feature. What is multidex and how to enable it you can find here.

3. Setup Manifest

Most of manifest settings will be added automatically by Gradle manifest merger.. But we still require you to set up some manifest elements. Please add elements that are between two '' comments to your manifest file:

<?xml version="1.0" encoding="utf-8"?>  
<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
  package="your.package.name">  
   
 <application  
  android:icon="@mipmap/ic_launcher"  
  android:label="@string/app_name">  
  
 <activity  
  android:name=".MainActivity"  
  android:label="@string/app_name">  
     <intent-filter> 
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />  
     </intent-filter>
 </activity>
  
 <!-- Appmediation -->  
 <!-- Mobvista -->
 <receiver android:name="com.mintegral.msdk.click.AppReceiver" >
    <intent-filter>
       <action android:name="android.intent.action.PACKAGE_ADDED" />
       <data android:scheme="package" />
    </intent-filter>
  </receiver>
  
 <!-- StatApp -->  
 <receiver android:name="com.startapp.android.publish.common.metaData.BootCompleteListener">
    <intent-filter>
       <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
 </receiver>  
 
 <!-- BAIDU -->  
 <meta-data
    android:name="app_license"
    android:value="your_baidu_license" />
 <!-- Appmediation -->  
 
 </application>  
</manifest>

P.S: To get your Baidu license key please contact your Appmediation manager or write to support@appmediation.com

Clone this wiki locally