Offerwall

The Offerwall is a full-screen visual that appears inside your application.

1. Override TMAdListener

You will need to override the TMAdListener class to receive callbacks on interstitial adverts. Create a new file and implement it like so:

public class OfferwallListener extends TMAdListener {
    @Override
    public void didLoad() {
        // Ready to display the Offerwall
    }
}

2. Load the offerwall

Before displaying an offerwall, call loadOfferwall, this should be done after didLoadConfig has been called, however offerwalls may still be available later than that.

Tapdaq.getInstance().loadOfferwall(<CurrentActivity>, new OfferwallListener);

3. Display the offerwall

Once the offerwall has loaded, listener for the didLoad event in the OfferwallListener, check its ready and call show, like so:

if(Tapdaq.getInstance().isOfferwallReady(MainActivity.this)) {
    Tapdaq.getInstance().showOfferwall(<CurrentActivity>, new OfferwallListener);
}

4. Load another offerwall on close

If you wish to load another offerwall after you have shown one, implement one of the following options:

A. Auto Reload all Ads

To auto reload all ads using the same placment tag set the global config before initialising, like so:

TapdaqConfig config = new TapdaqConfig(this);
config.setAutoReloadAds(true);

B. Implement Override

When creating an ad listener, override didClose() and call load for the same type.

private class OfferwallListener extends TMAdListener {
        @Override
        public void didClose() {
            Tapdaq.getInstance().loadOfferwall(<CurrentActivity>, this);
        }
    }

5. Reward the user

Offerwalls may provide users with rewards, this callbacks will be directed for the didCustomEvent method.

private class AdListener extends TMAdListener {
    @Override
    public void didCustomEvent(Map<Object, Object> eventData) {
      
    }
}

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.

What's next?

Now that you have successfully integrated an offerwall into your app, what would you like to do next?