Adobe Native Extension - SDK 9

SDK v9.8.0
SDK 9 supports the full range of Heyzap tools & features. SDK 10 (beta) provides access to the Fyber platform. Questions? Reach us at support@heyzap.com.

Step 1. Configure Dynamic Documentation

Select the version of the Heyzap 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. Get the SDK

SDK v9.8.0

Step 3. Add the Heyzap SDK to your project

Unzip the Heyzap SDK, which contains HeyzapAds.ane. Add this native extension to your project, and be sure that the extension is packaged on both Android and iOS. If your IDE doesn't do it for you automatically, add <extensionID>com.heyzap.sdk.extensions</extensionID> to the <extensions> tag in your application descriptor.

Step 4. Modify your Application Descriptor

If you haven't integrated a particular ad network, links to the relevant SDKs and integration instructions are provided.

AdColony

AdMob

Apple iAd

AppLovin

Chartboost

Domob

Facebook Audience Network

InMobi

Leadbolt

MdotM

UnityAds

Vungle

If you haven't already, use our Integration Wizard to setup the 3rd-party networks you want to use with mediation.

Once the ANE for each network you wish to mediate has been added to your project, Heyzap can detect and start mediating that network. Therefore, you do not need to add any code to your project other than making the necessary Android Manifest changes shown below.

Some 3rd-party networks fail when initialized multiple times. Please do not initialize or otherwise directly interact with 3rd-party networks mediated by Heyzap.

iOS

Make the following changes inside the <iPhone><InfoAdditions> tag of your application descriptor.

App Transport Security

iOS 9 added App Transport Security (ATS), which requires apps to use HTTPS for all networking. Starting in 2017, Apple will require that all apps use ATS unless they state a reason they can't.

All of the networks you have selected so far in the dynamic documentation (see the top of the page) fully support ATS, and do not require any additional configuration. Please ensure you've selected each network above that you will be integrating so this documentation can change if necessary.

Disable App Transport Security

iOS 9 added App Transport Security (ATS), which requires apps to use HTTPS for all networking. Starting in 2017, Apple will require that all apps use ATS unless they state a reason they can't.

Not all of your selected networks are ready for this requirement yet, so you'll need to add some exceptions. The following networks are requiring these exceptions:

Using an advertising SDK that needs to be excluded is considered a valid reason for needing this exception - in Apple's ATS docs, one acceptable reason is that your app must connect to a server managed by another entity that does not support secure connections. When your app is reviewed, you can provide this reason for needing the exceptions.

To add the necessary exceptions for the networks you chose, add the following entries to your app's Info.plist file:



Disable ATS

Register Custom URL Schemes

Starting in iOS 9, apps must register what URL schemes they can pass to [UIApplication canOpenURL:]. Add these URL schemes to your Info.plist:



Application URL Queries

Android



Step 5. Initialize the SDK

In your root Activity, start the Heyzap SDK:

import com.heyzap.sdk.ads.HeyzapAds;

// Your Publisher ID is: <PUBLISHER ID>
HeyzapAds.getInstance().start("<PUBLISHER ID>", 
                              HeyzapAds.FLAG_NONE);

Step 6: 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:

HeyzapAds.getInstance().showMediationTestSuite();

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 7. Show Ads

Methods you call on the Heyzap SDK will automatically dispatch to your enabled 3rd-party SDKs; a call to show will determine which ad network to use and then show the ad.

Interstitial Ads

import com.heyzap.sdk.ads.InterstitialAd;

// InterstitialAds are automatically fetched from our server
InterstitialAd.getInstance().show();

Video Ads

Videos must be fetched before they can be shown. As early as possible or after showing a video, call fetch. Videos are not fetched automatically.

import com.heyzap.sdk.ads.VideoAd;

// As early as possible, and after showing a video, call fetch
VideoAd.getInstance().fetch();

To show a video after fetching:

// Later, such as after a level is completed

if (VideoAd.getInstance().isAvailable()) {
    VideoAd.getInstance().show();
}

Rewarded Video Ads

Rewarded videos must be fetched before they can be shown. As early as possible or after showing a rewarded video, call fetch. Rewarded videos are not fetched automatically.

import com.heyzap.sdk.ads.IncentivizedAd;

// As early as possible, and after showing a rewarded video, call fetch
IncentivizedAd.getInstance().fetch();

To show a rewarded video after fetching:

// Later, such as after a level is completed

if (IncentivizedAd.getInstance().isAvailable()) {
    IncentivizedAd.getInstance().show();
}

Banner Ads

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.

To show a banner you must specify a position (BannerAd.POSITION_TOP or BannerAd.POSITION_BOTTOM):

import com.heyzap.sdk.ads.BannerAd;

BannerAd.getInstance().show(BannerAd.POSITION_TOP);

To remove a currently showing banner:

BannerAd.getInstance().hide();

All good? Head over to your mediation dashboard to view revenue, impressions, eCPM, network credentials, and more.


More Information:

To go to basic ANE SDK setup, click here.
To view Advanced Features, click here.

Unified Platform – Adobe Native Extension SDK 10

SDK v10.3.1
SDK 9 supports the full range of Heyzap tools & features. SDK 10 (beta) provides access to the Fyber platform. Questions? Reach us at support@heyzap.com.

SDK 10 is the launch of our unified platform with Fyber and unifies the core features of Heyzap and Fyber into a single stack. With the unified platform, you’ll be able to use our newest features while also gaining access to both dashboards.

From an integration perspective, the only major change is the replacement of network SDKs with adapter bundles.

Step 1. Configure Dynamic Documentation

Select the version of the Heyzap 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. Get the SDK

SDK v10.3.1

Step 3. Add the Heyzap SDK to your project

Upgrading from SDK 9? Start fresh by deleting your old Heyzap SDK ANE, and all third-party ads SDK ANEs. You should also remove the old <extensionID> tags from your application descriptor for the third-party ads SDKs.

Unzip the Heyzap SDK, which contains HeyzapAds.ane. Add this native extension to your project, and be sure that the extension is packaged on both Android and iOS. If your IDE doesn't do it for you automatically, add <extensionID>com.heyzap.sdk.extensions</extensionID> to the <extensions> tag in your application descriptor.

Step 4. Modify your Application Descriptor

If you haven't integrated a particular ad network, links to the relevant SDKs and integration instructions are provided.

AdColony

AdMob

Apple iAd

AppLovin

Chartboost

Facebook Audience Network

HyprMX

InMobi

MoPub

Tapjoy

UnityAds

Vungle

If you haven't already, use our Integration Wizard to setup the 3rd-party networks you want to use with mediation.

Once the ANE for each network you wish to mediate has been added to your project, Heyzap can detect and start mediating that network. Therefore, you do not need to add any code to your project other than making the necessary AndroidManifest.xml / .plist and extensionID changes shown here.

Some 3rd-party networks fail when initialized multiple times. Please do not initialize or otherwise directly interact with 3rd-party networks mediated by Heyzap.

iOS

Make the following changes inside the <iPhone><InfoAdditions> tag of your application descriptor.

App Transport Security

iOS 9 added App Transport Security (ATS), which requires apps to use HTTPS for all networking. Starting in 2017, Apple will require that all apps use ATS unless they state a reason they can't.

All of the networks you have selected so far in the dynamic documentation (see the top of the page) fully support ATS, and do not require any additional configuration. Please ensure you've selected each network above that you will be integrating so this documentation can change if necessary.

Disable App Transport Security

iOS 9 added App Transport Security (ATS), which requires apps to use HTTPS for all networking. Starting in 2017, Apple will require that all apps use ATS unless they state a reason they can't.

Not all of your selected networks are ready for this requirement yet, so you'll need to add some exceptions. The following networks are requiring these exceptions:

Using an advertising SDK that needs to be excluded is considered a valid reason for needing this exception - in Apple's ATS docs, one acceptable reason is that your app must connect to a server managed by another entity that does not support secure connections. When your app is reviewed, you can provide this reason for needing the exceptions.

To add the necessary exceptions for the networks you chose, add the following entries to your app's Info.plist file:



Disable ATS

Register Custom URL Schemes

Starting in iOS 9, apps must register what URL schemes they can pass to [UIApplication canOpenURL:]. Add these URL schemes to your Info.plist:



Application URL Queries

Android



Step 5. Initialize the SDK

In your root Activity, start the Heyzap SDK:

import com.heyzap.sdk.ads.HeyzapAds;

// Your Publisher ID is: <PUBLISHER ID>
HeyzapAds.getInstance().start("<PUBLISHER ID>", 
                              HeyzapAds.FLAG_NONE);

Step 6: 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. From the secondary screen, you can select a type of ad (Interstitial, Incentivized, or Banner), fetch that ad, and then display it.

From here, you can select a type of ad (Interstitial, 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:

HeyzapAds.getInstance().showMediationTestSuite();

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 7. Show Ads

Methods you call on the Heyzap SDK will automatically dispatch to your enabled 3rd-party SDKs; a call to show will determine which ad network to use and then show the ad.

Interstitial Ads

import com.heyzap.sdk.ads.InterstitialAd;

// InterstitialAds are automatically fetched from our server
InterstitialAd.getInstance().show();

Rewarded Video Ads

Rewarded videos must be fetched before they can be shown. As early as possible or after showing a rewarded video, call fetch. Rewarded videos are not fetched automatically.

import com.heyzap.sdk.ads.IncentivizedAd;

// As early as possible, and after showing a rewarded video, call fetch
IncentivizedAd.getInstance().fetch();

To show a rewarded video after fetching:

// Later, such as after a level is completed

if (IncentivizedAd.getInstance().isAvailable()) {
    IncentivizedAd.getInstance().show();
}

Banner Ads

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.

To show a banner you must specify a position (BannerAd.POSITION_TOP or BannerAd.POSITION_BOTTOM):

import com.heyzap.sdk.ads.BannerAd;

BannerAd.getInstance().show(BannerAd.POSITION_TOP);

To remove a currently showing banner:

BannerAd.getInstance().hide();

To specify banner sizes, use the BannerFetchOptions object, like so:

import com.heyzap.sdk.ads.BannerFetchOptions;

var position:String = BannerAd.POSITION_BOTTOM;
var tag:String = null;
var opts:BannerFetchOptions = new BannerFetchOptions();
opts.admobSize = BannerFetchOptions.ADMOB_SIZE_BANNER;
opts.facebookSize = BannerFetchOptions.FACEBOOK_SIZE_FLEXIBLE_WIDTH_HEIGHT_90;
BannerAd.getInstance().show(position, tag, opts);

All good? Head over to your mediation dashboard to view revenue, impressions, eCPM, network credentials, and more.


More Information:

To view Advanced Features, click here.