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.

To learn how to set up the more apps popup on the Tapdaq dashboard, visit the following guide.

NEW: SDK version 7.0.0 supports zones. Please note, this release does not currently support cross promotion ad serving. To access our cross promotion features, please use SDK version 6.4.0

1. Register the placement tags

To begin preparations for displaying a more apps popup, go back to your main activity where you had setup the Tapdaq SDK, and add modify it to look like this:

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.

List<TapdaqPlacement> placements = new ArrayList<>();

placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-1"));
placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-2"));
placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-3"));
placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-4"));
placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-5"));
placements.add(TapdaqPlacement.createPlacement(Arrays.asList(CreativeType.SQUARE_MEDIUM), "tray-position-backfill"));

TapdaqConfig config = new TapdaqConfig();
config.withPlacementTagSupport(placements.toArray(new TapdaqPlacement[placements.size()]));

Tapdaq.getInstance().initialize(this, "<APP_ID>", "<CLIENT_KEY>", config, new TapdaqInitListener());

2. Override TMMoreAppsListener

Next, you will need to override the TMMoreAppsListener class to receive callbacks related to the more apps popup. Create a new file and implement it like so:

private class MoreAppsListener extends TMMoreAppsListener {

    @Override
    public void didLoad() {
        // Ready to display the more apps popup
    }

}

3. Load the content

To load the more apps content, we recommend you load them once the Tapdaq SDK has initialised.

Go back to the TapdaqInitListener you created in the Quickstart guide, and add a call to load the more apps content, like so:

public class TapdaqInitListener extends TMInitListener {

    @Override
    public void didInitialise() {
        super.didInitialise();
        // Ads may now be requested
        Tapdaq.getInstance().loadMoreApps(<CurrentActivity>, new TMMoreAppsConfig(), new MoreAppsListener());
    }

}

4. Display the more apps popup

Navigate to the location in your code where you would like to display the more apps popup (e.g. after a button is tapped) and implement the following:

if (Tapdaq.getInstance().isMoreAppsReady(<CurrentActivity>)) {
    Tapdaq.getInstance().showMoreApps(<CurrentActivity>, new MoreAppsListener());
}

It's also possible to check when the content for the more apps popup has loaded, this is useful if you want to make a "More Apps" button visible on the screen. You can check when the content for the popup has loaded by implementing the following:

public class MoreAppsListener extends TMMoreAppsListener {

    @Override
    public void didLoad() {
        // Ready to display the more apps popup
    }

}

For a full list of more apps listeners we support, see our Advanced page.

5. Load more content on close

If you wish to refresh the more apps data after you have shown one, implement the following to your MoreAppsListener class:

@Override
public void didClose() {
    Tapdaq.getInstance().loadMoreApps(<CurrentActivity>, new TMMoreAppsConfig(), this);
}

Build and run your application to test the advert displays correctly.

6. Customise the look and feel

Colours and text can be customised to make the design fit into your app. When loading the popup, you must pass in a TDMoreAppsConfig object with the settings you wish to change. Here's an example:

TMMoreAppsConfig config = new TMMoreAppsConfig();

config.setHeaderText("More Games");
config.setInstalledButtonText("Play");

config.setHeaderTextColor(Color.WHITE);
config.setHeaderColor(Color.DKGRAY);
config.setHeaderCloseButtonColor(Color.BLACK);
config.setBackgroundColor(Color.GRAY);

config.setAppNameColor(Color.BLACK);
config.setAppButtonColor(Color.BLACK);
config.setAppButtonTextColor(Color.WHITE);
config.setInstalledAppButtonColor(Color.WHITE);
config.setInstalledAppButtonTextColor(Color.BLACK);

Tapdaq.getInstance().loadMoreApps(<CurrentActivity>, config, new MoreAppsListener());

Need help?

If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.