Offerwall

The offerwall contains the UI to show the user the rewarded apps which he can install and use. It is contained in a separate activity.

Displaying the offerwall

To display the offerwall call

Adjoe.showOfferwall()
    .then(() => {
        console.log('Now showing adjoe offerwall');
    })
    .catch((err) => {
        console.log('Could not show adjoe offerwall');
        console.error(err);
    });

This will launch the AdjoeActivity displaying the adjoe offerwall. The returned promise resolves when the call to Android's startActivity has been made (note that this does not necessarily mean that the offerwall is actually already displayed) and rejects with an error parameter when an error occurred while attempting to display the offerwall. If you need to know in advance whether the user will see the offerwall or not, you can call Adjoe.canShowOfferwall(). This method will return a promise which resolves with a boolean parameter. This parameter is set to true if you can show the regular offerwall and false otherwise.

Before the user can interact with the partner apps on our offerwall, he has to accept the adjoe Terms of Service and grant your app permission to track the usage of other apps in his phone settings.

Adjoe Parameters

You can pass additional UA and placement parameters when you show the offerwall:

Adjoe.showOfferwall({
	'uaNetwork': "uaNetwork_value",
	'uaChannel': "uaChannel_value",
	'uaSubPublisherCleartext': "uaSubPublisherCleartext_value",
	'uaSubPublisherEncrypted': "uaSubPublisherEncrypted_value",
	'placement': 'placement_value'
});

teaser_shown event

You should send the teaser_shown event when the user can see the teaser, e.g. the button via which he can access the adjoe SDK from the SDK App. Trigger this event when the teaser has been successfully rendered and would successfully redirect the user to the adjoe SDK. It should be triggered regardless of whether the user has actually clicked the teaser or not. This event is mostly appropriate for uses, in which the functionality of the SDK App and SDK are kept separate to a relevant degree.

Adjoe.sendEvent(Adjoe.EVENT_TEASER_SHOWN, null, {'<adjoeParams>'});

Best practices for teaser_shown event

It's always good to check if the offerwall can be shown to the user before showing the teaser button.

if (Adjoe.canShowOfferwall()) {
    // Show the teaser button.
    Adjoe.sendEvent(Adjoe.EVENT_TEASER_SHOWN, null, {'<adjoeParams>'});
}

Last updated