SDK Integration | Appodeal

SDK Integration

App key

Download SDK

You can download Xamarin SDK here.

Minimum OS requirements: Android API level 9 (Android OS 2.3).

AndroidManifest.xml

Add following permissions:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Add following under application tag:

<meta-data android:name="com.appodeal.framework" android:value="xamarin" />
<receiver android:name="com.appodeal.ads.AppodealPackageAddedReceiver" android:exported="true" android:enabled="true">
<intent-filter>
    <action android:name="android.intent.action.PACKAGE_ADDED" />
    <data android:scheme="package" />
</intent-filter>
</receiver>

<activity android:name="com.appodeal.ads.InterstitialActivity"
      android:configChanges="orientation|screenSize"
      android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name="com.appodeal.ads.VideoActivity"
      android:configChanges="orientation|screenSize"
      android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<activity android:name="com.appodeal.ads.LoaderActivity"
      android:configChanges="orientation|screenSize"
      android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

<activity android:name="com.google.android.gms.ads.AdActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
      android:theme="@android:style/Theme.Translucent" />

<activity android:name="com.chartboost.sdk.CBImpressionActivity" android:excludeFromRecents="true"
      android:hardwareAccelerated="true" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
      android:configChanges="keyboardHidden|orientation|screenSize" />

<activity android:name="com.applovin.adview.AppLovinInterstitialActivity"
      android:theme="@android:style/Theme.Translucent" />

<activity android:name="com.mopub.mobileads.MoPubActivity"
      android:configChanges="keyboardHidden|orientation|screenSize"
      android:theme="@android:style/Theme.Translucent" />
<activity android:name="com.mopub.common.MoPubBrowser"
      android:configChanges="keyboardHidden|orientation|screenSize" />
<activity android:name="com.mopub.mobileads.MraidActivity"
      android:configChanges="keyboardHidden|orientation|screenSize" />
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
      android:configChanges="keyboardHidden|orientation|screenSize" />

<activity android:name="org.nexage.sourcekit.mraid.MRAIDBrowser"
      android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
      android:theme="@android:style/Theme.Translucent" />


<activity android:name="com.amazon.device.ads.AdActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>

<activity android:name="com.my.target.ads.MyTargetActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

<activity android:name="org.nexage.sourcekit.vast.activity.VASTActivity"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

<activity android:name="org.nexage.sourcekit.vast.activity.VPAIDActivity"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

<!--suppress AndroidDomInspection -->
<activity android:name="com.appodeal.ads.networks.vpaid.VPAIDActivity"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

<activity android:name="com.appodeal.ads.networks.SpotXActivity"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
<!--suppress AndroidDomInspection -->
<activity android:name="com.facebook.ads.InterstitialAdActivity" android:configChanges="keyboardHidden|orientation|screenSize" />

<activity android:name="com.unity3d.ads.adunit.AdUnitActivity"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="true" />
<activity android:name="com.unity3d.ads.adunit.AdUnitSoftwareActivity"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="false" />
<activity android:name="com.unity3d.ads2.adunit.AdUnitActivity"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="true" />
<activity android:name="com.unity3d.ads2.adunit.AdUnitSoftwareActivity"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="false" />


<!--suppress AndroidDomInspection -->
<activity android:name="com.jirbo.adcolony.AdColonyOverlay"
      android:configChanges="keyboardHidden|orientation|screenSize"
      android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.jirbo.adcolony.AdColonyFullscreen"
      android:configChanges="keyboardHidden|orientation|screenSize"
      android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.jirbo.adcolony.AdColonyBrowser"
      android:configChanges="keyboardHidden|orientation|screenSize"
      android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.vungle.publisher.FullScreenAdActivity"
      android:configChanges="keyboardHidden|orientation|screenSize"
      android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
<!--suppress AndroidDomInspection -->
<activity android:name="com.startapp.android.publish.list3d.List3DActivity"
      android:theme="@android:style/Theme" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.startapp.android.publish.OverlayActivity"
      android:theme="@android:style/Theme.Translucent"
      android:configChanges="orientation|keyboardHidden|screenSize" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.startapp.android.publish.FullScreenActivity"
      android:theme="@android:style/Theme"
      android:configChanges="orientation|keyboardHidden|screenSize" />
<service android:name="com.yandex.metrica.MetricaService" android:enabled="true"
     android:exported="true" android:process=":Metrica">
	<intent-filter>
		<category android:name="android.intent.category.DEFAULT" />
		<action android:name="com.yandex.metrica.IMetricaService" />
		<data android:scheme="metrica" />
	</intent-filter>
	<meta-data android:name="metrica:api:level" android:value="44" />
</service>
<receiver android:name="com.yandex.metrica.MetricaEventHandler"
      android:enabled="true" android:exported="true">
	<intent-filter>
		<action android:name="com.android.vending.INSTALL_REFERRER" />
	</intent-filter>
</receiver>
<!--suppress AndroidDomInspection -->
<activity android:name="com.yandex.mobile.ads.AdActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

<!--suppress AndroidDomInspection -->
<activity android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

<activity android:name="com.appodeal.ads.VideoPlayerActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>

<!--suppress AndroidDomInspection -->
<activity android:name="com.revmob.FullscreenActivity" android:theme="@android:style/Theme.Translucent"
    android:configChanges="keyboardHidden|orientation"/>

<!--suppress AndroidDomInspection -->
<activity android:name="com.tapjoy.TJAdUnitActivity" android:configChanges="orientation|keyboardHidden|screenSize"
            android:hardwareAccelerated="true" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.tapjoy.mraid.view.ActionHandler" android:configChanges="orientation|keyboardHidden|screenSize" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.tapjoy.mraid.view.Browser" android:configChanges="orientation|keyboardHidden|screenSize" />
<!--suppress AndroidDomInspection -->
<activity android:name="com.tapjoy.TJContentActivity" android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" android:hardwareAccelerated="true" />

Advanced Features

Google Play device compatibility

If you are not using location services in you app and not using any other SDK that requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permissions, you can add the following code to manifest to make your app available on devices that don't have GPS support:

<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />

Xamarin Integration

SDK and Plugin Integration

Add AppodealXamarinPlugin.dll to the references of your project.

Don’t forget to include google play services library to your project

SDK Initialization

Import Appodeal plugin to your script:

using Com.Appodeal.Ads;

To initialize SDK, you need to add the following code in onCreate method of your main activity:

String appKey = "fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f";
Appodeal.Initialize(this, appKey, Appodeal.INTERSTITIAL | Appodeal.BANNER);

To initialize only interstitials use Appodeal.Initialize(this, appKey, Appodeal.INTERSTITIAL)

To initialize only skippable videos use Appodeal.Initialize(this, appKey, Appodeal.SKIPPABLE_VIDEO)

To initialize only rewarded video use Appodeal.Initialize(this, appKey, Appodeal.REWARDED_VIDEO)

To initialize only non-skippable video use Appodeal.Initialize(this, appKey, Appodeal.NON_SKIPPABLE_VIDEO)

To initialize interstitials and videos use Appodeal.Initialize(this, appKey, Appodeal.INTERSTITIAL | Appodeal.SKIPPABLE_VIDEO)

To initialize only banners use Appodeal.Initialize(this, appKey, Appodeal.BANNER)

Display Ad

Appodeal.Show(this, adTypes);

Show() returns a boolean value indicating whether show call was passed to appropriate SDK

To display interstitial use Appodeal.Show(this, Appodeal.INTERSTITIAL)

To display skippable video use Appodeal.Show(this, Appodeal.SKIPPABLE_VIDEO)

To display rewarded video use Appodeal.Show(this, Appodeal.REWARDED_VIDEO)

To display non-skippable video use Appodeal.Show(this, Appodeal.NON_SKIPPABLE_VIDEO)

To display interstitial or video use Appodeal.Show(this, Appodeal.INTERSTITIAL | Appodeal.SKIPPABLE_VIDEO)

To display banner at the bottom of the screen use Appodeal.Show(this, Appodeal.BANNER_BOTTOM)

To display banner at the top of the screen use Appodeal.Show(this, Appodeal.BANNER_TOP)

To display banner at the center of the screen use Appodeal.Show(this, Appodeal.BANNER_CENTER)

To display banner in the view specified in layout file use Appodeal.Show(this, Appodeal.BANNER_VIEW)

Hiding Banner

To hide banner you need to call the following code in activity:

Appodeal.Hide(this, Appodeal.BANNER);

Samples

Display interstitial after it was loaded

Extend your class with IInterstitialCallbacks :

public class MainActivity : Activity, IInterstitialCallbacks

Then after initialization call:

Appodeal.SetAutoCache(Appodeal.INTERSTITIAL, false);
Appodeal.Initialize(this, appKey, Appodeal.INTERSTITIAL);
Appodeal.Cache(this, Appodeal.INTERSTITIAL);
Appodeal.SetInterstitialCallbacks(this);

public void OnInterstitialLoaded(bool b) { Appodeal.Show(this, Appodeal.INTERSTITIAL); }
public void OnInterstitialFailedToLoad() { }
public void OnInterstitialShown() { }
public void OnInterstitialClosed() { }
public void OnInterstitialClicked() { }

Display interstitial after app launch

Appodeal.Initialize(this, appKey, Appodeal.INTERSTITIAL);
Appodeal.Show(this, Appodeal.INTERSTITIAL);

Advanced Features

Enabling test mode

Appodeal.SetTesting(true);

In test mode test, ads will be shown and debug data will be written to logcat

Enabling logging

Appodeal.SetLogging(true);

Enable debug logging to logcat using tag "Appodeal"

Checking if ad is loaded

Appodeal.IsLoaded(adTypes);

To check if interstitial is loaded use Appodeal.IsLoaded(Appodeal.INTERSTITIAL)

To check if skippable video is loaded use Appodeal.IsLoaded(Appodeal.SKIPPABLE_VIDEO)

To check if rewarded video is loaded use Appodeal.IsLoaded(Appodeal.REWARDED_VIDEO)

To check if non-skippable video is loaded use Appodeal.IsLoaded(Appodeal.NON_SKIPPABLE_VIDEO)

To check if banner is loaded use Appodeal.IsLoaded(Appodeal.BANNER)

Checking if loaded ad is precache

Appodeal.IsPrecache(adTypes);

Currently supported only for interstitials, Use Appodeal.IsPrecache(Appodeal.INTERSTITIAL)

Setting Interstitial callbacks

Extend your class with IInterstitialCallbacks, for example:

public class MainActivity : Activity, IInterstitialCallbacks

Then after initialization call:

Appodeal.setInterstitialCallbacks(this);

Now you can use following callback methods in your class:

public void OnInterstitialLoaded(bool isPrecache) { }
public void OnInterstitialFailedToLoad() { }
public void OnInterstitialShown() { }
public void OnInterstitialClosed() { }
public void OnInterstitialClicked() { }

Setting skippable video callbacks

Extend your class with ISkippableVideoCallbacks, for example:

public class MainActivity : Activity, ISkippableVideoCallbacks

Then after initialization call:

Appodeal.SetSkippableVideoCallbacks(this);

Now you can use following callback methods in your class:

public void OnSkippableVideoLoaded() { }
public void OnSkippableVideoFailedToLoad() { }
public void OnSkippableVideoShown() { }
public void OnSkippableVideoClosed(boolean finished) { }
public void OnSkippableVideoFinished() { }

Setting rewarded video callbacks

Extend your class with IRewardedVideoCallbacks, for example:

public class MainActivity : Activity, IRewardedVideoCallbacks

Then after initialization call:

Appodeal.SetRewardedVideoCallbacks(this);

Now you can use following callback methods in your class:

public void OnRewardedVideoLoaded() { }
public void OnRewardedVideoFailedToLoad() { }
public void OnRewardedVideoShown() { }
public void OnRewardedVideoClosed(boolean finished) { }
public void OnRewardedVideoFinished(int amount, string name) { }

Setting non-skippable video callbacks

Extend your class with INonSkippableVideoCallbacks, for example:

public class MainActivity : Activity, INonSkippableVideoCallbacks

Then after initialization call:

Appodeal.SetNonSkippableVideoCallbacks(this);

Now you can use following callback methods in your class:

public void OnNonSkippableVideoLoaded() { }
public void OnNonSkippableVideoFailedToLoad() { }
public void OnNonSkippableVideoShown() { }
public void OnNonSkippableVideoClosed(boolean finished) { }
public void OnNonSkippableVideoFinished() { }

Setting banner callbacks

Extend your class with IBannerCallbacks, for example:

public class MainActivity : Activity, IBannerCallbacks

Then after initialization call:

Appodeal.SetBannerCallbacks(this);

Now you can use following callback methods in your class:

public void OnBannerLoaded(int height, bool isPrecache) { }
public void OnBannerFailedToLoad() { }
public void OnBannerShown() { }
public void OnBannerClicked() { }

Manual ad caching

Appodeal.Cache(this, adTypes);

You should disable automatic caching before SDK initialization using SetAutoCache(adTypes, false).

To cache interstitial use Appodeal.Cache(this, Appodeal.INTERSTITIAL)

To cache skippable video use Appodeal.Cache(this, Appodeal.SKIPPABLE_VIDEO)

To cache rewarded video use Appodeal.Cache(this, Appodeal.REWARDED_VIDEO)

To cache non-skippable video use Appodeal.Cache(this, Appodeal.NON_SKIPPABLE_VIDEO)

To cache interstitial and video use Appodeal.Cache(this, Appodeal.INTERSTITIAL | Appodeal.SKIPPABLE_VIDEO)

To cache banner use Appodeal.Cache(this, Appodeal.BANNER)

Enabling or disabling automatic caching

Appodeal.SetAutoCache(adTypes, false);

Should be used before SDK initialization

To disable automatic caching for interstitials use Appodeal.SetAutoCache(Appodeal.INTERSTITIAL, false)

To disable automatic caching for skippable videos use Appodeal.SetAutoCache(Appodeal.SKIPPABLE_VIDEO, false)

To disable automatic caching for rewarded videos use Appodeal.SetAutoCache(Appodeal.REWARDED_VIDEO, false)

To disable automatic caching for non-skippable videos use Appodeal.SetAutoCache(Appodeal.NON_SKIPPABLE_VIDEO, false)

To disable automatic caching for banners use Appodeal.SetAutoCache(Appodeal.BANNER, false)

Triggering onLoaded callback on precache

Appodeal.SetOnLoadedTriggerBoth(adTypes, true);

Currently supported only for interstitials

SetOnLoadedTriggerBoth(Appodeal.INTERSTITIAL, false) - onInterstitialLoaded will trigger only when normal ad was loaded (default).

SetOnLoadedTriggerBoth(Appodeal.INTERSTITIAL, true) - onInterstitialLoaded will trigger twice, both when precache and normal ad were loaded.

Should be used before SDK initialization

Display banner in the view specified in layout file

Add com.appodeal.ads.BannerView to your layout file:

<com.appodeal.ads.BannerView 
  android:id="@+id/appodealBannerView" 
  android:layout_width="match_parent" 
  android:layout_height="wrap_content" 
  android:visibility="gone" />

Set view id before SDK initialization

Appodeal.setBannerViewId(R.id.appodealBannerView);

Now you can show banner in the view specified:

Appodeal.show(this, Appodeal.BANNER_VIEW);

Using programmatically created banner view

Create banner view

Appodeal.getBannerView(this);

Add view to your layout and then show banner in it:

Appodeal.show(this, Appodeal.BANNER_VIEW);

Handling orientation change

If your activity is recreated on screen rotation banner will disappear. To prevent that you need to call the following method in onResume of your activity:

@Override public void onResume() {
  super.onResume();
  Appodeal.OnResume(this, Appodeal.BANNER);
}

Disabling networks

Appodeal.DisableNetwork(this, (String)network);

Available parameters: "amazon_ads", "applovin", "chartboost", "mopub", "unity_ads", "mailru", "facebook", "adcolony", "vungle", "yandex", "startapp", "avocarrot", "flurry", "pubnative", "cheetah", "inner-active", "revmob".

Should be used before SDK initialization

Disabling networks

Appodeal.DisableNetwork(this, (String)network, adTypes);

Remove adapters from Project

Appodeal.DisableNetwork(this, "startapp", Appodeal.BANNER | Appodeal.INTERSTITIAL)

Disabling location permission check

To disable toast messages ACCESS_COARSE_LOCATION permission is missing, use the following method:

Appodeal.DisableLocationPermissionCheck();

Should be used before SDK initialization.

Tracking in-app purchase

Appodeal.TrackInAppPurchase((Context) this, amount, currencyCode)

Tracks in-app purchase information and sends info to our servers for analytics. Example:

Appodeal.TrackInAppPurchase(this, 5, "USD")

Setting User Data

Initialization

Our SDK provides the transfer of user data for better ad targeting and higher eCPM. All parameters are optional and can be defined partially.

To obtain reference to the user settings, please call this before Appodeal initialization:

UserSettings userSettings = Appodeal.GetUserSettings((Context) this);

Set the age of the user

Positive integer value.

userSettings.SetAge(25);

Set birth date

userSettings.SetBirthday("17/06/1990");

birthday in format "DD/MM/YYYY" or "MM/YYYY" or "YYYY"

Set user email

userSettings.SetEmail("hi@appodeal.com");

Set Facebook ID

userSettings.SetFacebookId("1623169517896758");

Set User ID

userSettings.SetVkId("91918219");

Specify gender of the user

userSettings.SetGender(UserSettings.Gender.FEMALE);

Possible values: UserSettings.Gender.FEMALE, UserSettings.Gender.MALE, UserSettings.Gender.OTHER.

Set interests of the user

userSettings.SetInterests("reading, games, movies, snowboarding");

Specify occupation of the user

userSettings.SetOccupation(UserSettings.Occupation.WORK);

Possible values: UserSettings.Occupation.WORK, UserSettings.Occupation.UNIVERSITY, UserSettings.Occupation.SCHOOL, UserSettings.Occupation.OTHER.

Specify marital status of the user

userSettings.SetRelation(UserSettings.Relation.DATING);

Possible values: UserSettings.Relation.DATING, UserSettings.Relation.ENGAGED, UserSettings.Relation.MARRIED, UserSettings.Relation.SEARCHING, UserSettings.Relation.SINGLE, UserSettings.Relation.OTHER.

Set drinking habits of the user

userSettings.SetAlcohol(UserSettings.Alcohol.NEGATIVE);

Possible values: UserSettings.Alcohol.NEGATIVE, UserSettings.Alcohol.NEUTRAL, UserSettings.Alcohol.POSITIVE.

User attitude to smoking

userSettings.SetSmoking(UserSettings.Smoking.NEGATIVE);

Possible values: UserSettings.Smoking.NEGATIVE, UserSettings.Smoking.POSITIVE, UserSettings.Smoking.NEUTRAL.

Proguard Settings

If you are using Proguard

If you are using Proguard add the following to your Proguard config file:

# Appodeal
-keep class com.appodeal.** { *; }
-keep class org.nexage.** { *; }
-keepattributes EnclosingMethod, InnerClasses, Signature, JavascriptInterface

# Amazon
-keep class com.amazon.** { *; }
-dontwarn com.amazon.**

# Mopub
-keep public class com.mopub.**
-keepclassmembers class com.mopub.** { public *; }
-dontwarn com.mopub.**
-keep class * extends com.mopub.mobileads.CustomEventBanner {}
-keepclassmembers class com.mopub.mobileads.CustomEventBannerAdapter {!private !public !protected *;}
-keep class * extends com.mopub.mobileads.CustomEventInterstitial {}
-keep class * extends com.mopub.nativeads.CustomEventNative {}
-keep class * extends com.mopub.mobileads.CustomEventRewardedVideo {}
-dontwarn com.mopub.volley.toolbox.**
-keepclassmembers class ** { @com.mopub.common.util.ReflectionTarget *; } 

# Applovin
-keep class com.applovin.** { *; }
-dontwarn com.applovin.**

# Facebook
-keep class com.facebook.ads.** { *; }
-keeppackagenames com.facebook.*
-dontwarn com.facebook.ads.**

# Chartboost
-keep class com.chartboost.** { *; }
-dontwarn com.chartboost.**

# Unity Ads
-keepattributes SourceFile,LineNumberTable
-keep class com.unity3d.** { *; }
-dontwarn com.unity3d.**

# Yandex
-keep class com.yandex.metrica.** { *; }
-dontwarn com.yandex.metrica.**
-keep class com.yandex.mobile.ads.** { *; }
-dontwarn com.yandex.mobile.ads.**
-keepattributes *Annotation*

# StartApp
-keep class com.startapp.** { *;}
-dontwarn com.startapp.**
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile, LineNumberTable, *Annotation*, EnclosingMethod

# Avocarrot
-keep class com.avocarrot.** { *; }
-keepclassmembers class com.avocarrot.** { *; }
-dontwarn com.avocarrot.**
-keep public class * extends android.view.View {
  public <init>(android.content.Context);
  public <init>(android.content.Context, android.util.AttributeSet);
  public <init>(android.content.Context, android.util.AttributeSet, int);
  public void set*(...);
}

# Adcolony
-keep class com.jirbo.adcolony.** { *;}
-keep class com.adcolony.** { *;}
-keep class com.immersion.** { *;}
-dontnote com.immersion.**
-dontwarn android.webkit.**
-dontwarn com.jirbo.adcolony.**
-dontwarn com.adcolony.**

# Vungle
-keepattributes *Annotation*, Signature
-keep class com.vungle.** { *;}
-dontwarn com.vungle.**
-keep class com.moat.analytics.mobile.vng.** { *;}
-keep class dagger.**
-keep class de.greenrobot.event.**
-keep class javax.inject.**
-keep class rx.**

# MyTarget
-keep class com.my.target.** { *; }
-dontwarn com.my.target.**

# Admob
-keep class com.google.android.gms.ads.** { *; }

# Tapjoy
-keep class com.tapjoy.** { *; }
-dontwarn com.tapjoy.**

# IronSource
-keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface { public *; }
-keepclassmembers class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }
-keep class com.ironsource.** { *; }
-dontwarn com.ironsource.**

# AdColonyV3
-keepclassmembers class * { @android.webkit.JavascriptInterface <methods>; }
-keep class com.adcolony.** { *; }
-dontwarn com.adcolony.**
-dontwarn android.app.Activity

#Appnext
-keep class com.appnext.** { *; }
-dontwarn com.appnext.**

# Inmobi
-keep class com.inmobi.** { *; }
-dontwarn com.inmobi.**
-dontwarn com.squareup.picasso.**
-keep class com.squareup.picasso.** {*;}
-dontwarn com.squareup.picasso.**
-dontwarn com.squareup.okhttp.**
-keep class com.moat.** {*;}
-dontwarn com.moat.**

-dontnote sun.misc.Unsafe
-dontnote android.net.http.*

-dontnote org.apache.commons.codec.**
-dontnote org.apache.http.**

-dontwarn org.apache.commons.collections.BeanMap
-dontwarn java.beans.**
-dontnote com.google.gson.**
-keepclassmembers class * implements java.io.Serializable {
  static final long serialVersionUID;
  private static final java.io.ObjectStreamField[] serialPersistentFields;
  private void writeObject(java.io.ObjectOutputStream);
  private void readObject(java.io.ObjectInputStream);
  java.lang.Object writeReplace();
  java.lang.Object readResolve();
}

# Google
-keep class com.google.android.gms.common.GooglePlayServicesUtil {*;}
-keep class com.google.android.gms.ads.identifier.** { *; }
-dontwarn com.google.android.gms.**

# Legacy
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn android.net.http.**

# Google Play Services library
-keep class * extends java.util.ListResourceBundle {
  protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
  public static final *** NULL;
}
-keepnames class * implements android.os.Parcelable
-keepclassmembers class * implements android.os.Parcelable {
  public static final *** CREATOR;
}
-keep @interface android.support.annotation.Keep
-keep @android.support.annotation.Keep class *
-keepclasseswithmembers class * {
  @android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
  @android.support.annotation.Keep <methods>;
}
-keep @interface com.google.android.gms.common.annotation.KeepName
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
  @com.google.android.gms.common.annotation.KeepName *;
}
-keep @interface com.google.android.gms.common.util.DynamiteApi
-keep public @com.google.android.gms.common.util.DynamiteApi class * {
  public <fields>;
  public <methods>;
}
-keep class com.google.android.gms.common.GooglePlayServicesNotAvailableException {*;}
-keep class com.google.android.gms.common.GooglePlayServicesRepairableException {*;}

# Google Play Services library 9.0.0 only
-dontwarn android.security.NetworkSecurityPolicy
-keep public @com.google.android.gms.common.util.DynamiteApi class * { *; }

# support-v4
-keep class android.support.v4.app.Fragment { *; }
-keep class android.support.v4.app.FragmentActivity { *; }
-keep class android.support.v4.app.FragmentManager { *; }
-keep class android.support.v4.app.FragmentTransaction { *; }
-keep class android.support.v4.content.ContextCompat { *; }
-keep class android.support.v4.content.LocalBroadcastManager { *; }
-keep class android.support.v4.util.LruCache { *; }
-keep class android.support.v4.view.PagerAdapter { *; }
-keep class android.support.v4.view.ViewPager { *; }
-keep class android.support.v4.content.ContextCompat { *; }

# support-v7-recyclerview
-keep class android.support.v7.widget.RecyclerView { *; }
-keep class android.support.v7.widget.LinearLayoutManager { *; }

Admob Adapter

Admob adapter for Appodeal is included with our jar.

To use it, do the following:

1. Go to your adUnit, click on “Mediation ad sources”

2. Add New ad network

3. Add new Custom Event:

Class Name - com.google.ads.mediation.appodeal.AppodealCustomEvent

Label - AppodealCustomEvent

Parameter - fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f

Admob1
Admob2

MoPub Adapter

MoPub adapter for Appodeal is included with our jar.

To use it, do the following:

1. On the MoPub Networks page click “Add Network”

2. Choose “Custom Native Network”

3. Enter the Custom Event Class information into the text boxes.

Custom Event Class - com.mopub.mobileads.AppodealCustomEventInterstitial

Custom Event Class Data - {"appKey":"fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f"}

Mopub1
Mopub2