Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

More Apps

Dominic Roberts edited this page Dec 4, 2017 · 1 revision

More Apps

Contents

The More Apps unit presents a list of your promoted applications to your users in the form of a popup.

Each position in the more apps template has it’s own custom placement tag. This enables you to control exactly which apps are shown in each position within the unit.

1. Register the placement tags

We need to register placement tags in Tapdaq config first.

var config:TapdaqConfig = new TapdaqConfig(<applicationID>, <clientKey>);
var placements:Array = [
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-1"),
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-2"),
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-3"),
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-4"),
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-5"),
	new Placement([TapdaqCreativeType.SQUARE_MEDIUM], "tray-position-backfill")
	];
config.withPlacementTagSupport(placements);
_tapdaq = Tapdaq.init(config);

Adding a backfill tag will populate the bottom of your list with backfill items setup in the dashboard, to use this add tray-position-backfill to your registered placements.

2. Configure event listeners

Now we need to configure event listeners to get events into our app.

MoreApps.getInstance().addEventListener(TapdaqEvent.DID_LOAD,onTapdaqEvent);
MoreApps.getInstance().addEventListener(TapdaqEvent.FAILED_LOAD,onTapdaqEvent);
MoreApps.getInstance().addEventListener(TapdaqEvent.DID_SHOW,onTapdaqEvent);
MoreApps.getInstance().addEventListener(TapdaqEvent.DID_CLOSE,onTapdaqEvent);

3. Load More Apps

Now we could load More Apps content. We recommend to load it once the Tapdaq SDK has initialised.

var moreAppsConfig = new MoreAppsConfig();
moreAppsConfig.headerText = "MoreApps Example";
moreAppsConfig.headerTextColor= Color.AQUA;
MoreApps.getInstance().load(moreAppsConfig);

We should receive the TapdaqEvent.DID_LOAD event when it is loaded or we could check More Apps availability flag.

MoreAppsConfig is a class we use to setup More Apps.

4. Check More Apps Availability

After we loaded More Apps we could check if it is available.

MoreApps.getInstance().isAvailable();

5. Show More Apps

Now we could show More Apps to user:

MoreApps.getInstance().show();

Need help?

If you are having any problems integrating, feel free to contact us on support@tapdaq.com and we will be more than happy to help.

What's next?

Now that you have successfully integrated a native ad into your app, what would you like to do next?

Clone this wiki locally