Unified Platform – Android

Our Unified Platform with Fyber, also called SDK 10 or the Fyber Wrapper, brings together the core features of Heyzap and Fyber into a single SDK. Things like Offer Wall and Fyber's different selection of ad networks are offered via this wrapper SDK.

Native ads, Heyzap Cross Promotion, and some of our dashboard's more powerful features & settings (e.g.: Segmentation, most uses of Tags, and some of the Publisher Settings) are not supported via this wrapper SDK, so consider what features you will be using when deciding which SDK to use.

From an integration perspective, the only major change when switching to the Unified Platform is the replacement of "raw" third-party network SDKs with Fyber's adapter bundles. Each of Fyber's adapter bundles contains its own code along with the third-party SDK, so you must use these instead.


  • The Heyzap/Fyber Unified Platform works on Android 2.3.3 and above.
  • In order to download and use SDK 10, you must first have a payout method selected & filled out here.

Step 1. Configure Dynamic Documentation

Select the version of the SDK you wish to view documentation for, and then select the networks you are integrating. The documentation on this page will update with specific instructions that may apply to your selections.

Network Selection:

Step 2. Add the SDK and third party networks to your project

Switching from SDK 9? Start by deleting your old Heyzap SDK, and all 3rd-party ads SDKs.

SDK v10.4.1

By use of the Heyzap SDK you agree to our Heyzap SDK Agreement

Unzip the downloaded file.

Android Studio Users

Add the following to your build.gradle


Copy the included heyzap-unified-platform-10.4.1.aar to your libs folder.

Eclipse Users

Copy the included heyzap-unified-platform-10.4.1.jar to your libs folder.



Apple iAd



Facebook Audience Network






Step 3. Modify your Android Manifest

Network Credentials

Add the following entries to the application section of your AndroidManifest.xml:

Android Studio Users

All permissions and activities are automatically included through the gradle dependencies added above. No additional manifest changes are required.

Eclipse Users

Mandatory Permissions

Add the following permissions to your AndroidManifest.xml:

Optional Permissions

The following permissions are not required for our SDK and 3rd-party SDKs to function, but including them in your AndroidManifest.xml may result in improved eCPM and user experience:


Add the following activities to your AndroidManifest.xml:

Google Play Services

The Google Play Services SDK must be added to your project for these networks. Follow Google's documentation on integrating the Google Play Services SDK into your app. Only the Ads and Location APIs need to be included.

Step 4. Initialize the SDK

In your root Activity, start the Heyzap SDK:

import com.heyzap.sdk.ads.HeyzapAds;

Activity activity = this; // must be an Activity
// Your Publisher ID is: <PUBLISHER ID>
HeyzapAds.start("<PUBLISHER ID>", activity);

Step 5: Test your 3rd-party Integrations (Optional)

The mediation SDK comes with a Mediation Test Suite that you can use to test each of the networks you've chosen:

The first screen lets you pick a network. Once you choose a network, you'll see if:

  1. The network is installed correctly.
  2. The network has valid credentials on your dashboard.
  3. The network is enabled on your dashboard.

From here, you can select a type of ad (Interstitial, Video, Incentivized, or Banner), fetch that ad, and then display it.

To use the Mediation Test Suite, simply call this method after you start the SDK:


At this point, you should launch the Mediation Test Suite and verify that each network you want to use has the correct credentials and shows ads correctly.

Step 6. Show Ads

Methods you call on the Heyzap SDK will automatically dispatch to your enabled 3rd-party SDKs; a call to display will iterate over ad networks in order of expected CPM until it finds one that has an ad, optimizing CPM and fill rate. Use the code below to display your preferred ad format:

Interstitial Ads

import com.heyzap.sdk.ads.InterstitialAd;

// InterstitialAds are automatically fetched from our server

Video Ads

Version 9 of the Heyzap SDK included an API that could be used to display only interstitial video ads. The unified platform's server-side configuration options have made this API redundant, and it has been removed. If you would like to display only video ads, please use the InterstitialAd API, and set your game's "Blended Video" option to "Enabled: show ONLY video". This option can be found under "Publisher Settings" for your game.

Rewarded Video Ads

Unlike interstitial ads, video ads are not pre-cached automatically. They must be fetched manually. Depending on the available internet connection, it may take some time to fully download the necessary assets, so it is strongly recommended fetching at the earliest point in your application lifecycle, and following the view of any video ad.

import com.heyzap.sdk.ads.IncentivizedAd;

// As early as possible, and after showing a rewarded video, call fetch

Later, such as after a level is completed, you can check if the ad has fetched, and display the ad if it is available.

if (IncentivizedAd.isAvailable()) {

Banner Ads

Heyzap mediates banners from AdMob and Facebook Audience Network. We don't currently have our own banners offering, so you'll need to have one of these networks integrated to use them.

Note: Most banner networks have a setting on their dashboard to automatically refresh at a given time interval. If you want to use this feature, it is strongly recommended that you use the same time interval on all of the banner networks you are using. Different refresh rates for different networks can result in confusing impression statistics.

import com.heyzap.sdk.ads.BannerAdView;

private BannerAdView bannerAdView;

public void onCreate(Bundle savedInstanceState) {
    // ...

    Activity activity = this; // Must be an Activity.
    bannerAdView = new BannerAdView(activity);

    // This must be some view in your layout.
    FrameLayout bannerWrapper = (FrameLayout) findViewById(R.id.banner_wrapper);

    // Add the banner ad view to the wrapper.

    // Load the banner ad.

You should also destroy the banner ad view in the onDestroy method of your Activity.

protected void onDestroy() {

Offer Wall

The combined platform SDK provides access to the Fyber Offer Wall as of SDK version 10.0. The Offer Wall allows your users to complete certain activities in exchange for in-game currency.

First, make sure you have this activity in your Manifest:

<activity android:name="com.fyber.ads.ofw.OfferWallActivity" android:configChanges="orientation|screenSize" />

To receive notifications about the Offer Wall intent availability, implement the RequestCallback interface:

RequestCallback requestCallback = new RequestCallback() {

    public void onRequestError(RequestError requestError) {
        Log.d(TAG, "Something went wrong with the request: " + requestError.getDescription());

    public void onAdAvailable(Intent intent) {
        Log.d(TAG, "Offers are available");
        this.ofwIntent = intent;

    public void onAdNotAvailable(AdFormat adFormat) {
        Log.d(TAG, "No ad available");
        this.ofwIntent = null;

Request an Offer Wall:

    .closeOnRedirect(true) // using this optional line will make the Offer Wall close after the user interacts with one offer

Show an Offer Wall:

 if (this.ofwIntent) {
     startActivityForResult(this.ofwIntent, OFFERWALL_REQUEST_CODE);

Fyber's docs have more advanced information on configuring the Offer Wall if you are interested.

Reward the user:

Whenever you think the user may have earned more currency, make a virtual currency request. If the user has earned more currency since the last time a virtual currency request was made, the amount of new currency the user has earned will be returned to the onSuccess callback.

VirtualCurrencyCallback virtualCurrencyCallback = new VirtualCurrencyCallback() {
    public void onRequestError(RequestError requestError) {
        Log.d(TAG, "request error: " + requestError.getDescription());

    public void onSuccess(VirtualCurrencyResponse virtualCurrencyResponse) {
        // Process the deltaOfCoins in the way that makes most sense for your application
        double deltaOfCoins = virtualCurrencyResponse.getDeltaOfCoins();

    public void onError(VirtualCurrencyErrorResponse virtualCurrencyErrorResponse) {
        Log.d(TAG, "VCS error received - " + virtualCurrencyErrorResponse.getErrorMessage());


Fyber's docs have more advanced information on configuring the user if you are interested.