-
Notifications
You must be signed in to change notification settings - Fork 0
More Apps
- 1. Register the placement tags
- 2. Configure event listeners
- 3. Load More Apps
- 4. Check More Apps Availability
- 5. Show More Apps
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.
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.
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);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.
After we loaded More Apps we could check if it is available.
MoreApps.getInstance().isAvailable();Now we could show More Apps to user:
MoreApps.getInstance().show();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.
Now that you have successfully integrated a native ad into your app, what would you like to do next?