Playtime Access
The Playtime feed contains the apps which the users can install and use to gain rewards. It is contained in a separate activity.

Launching Playtime

To launch Playtime, call
1
Adjoe.showOfferwall()
2
.then(() => {
3
console.log('Now showing adjoe offerwall');
4
})
5
.catch((err) => {
6
console.log('Could not show adjoe offerwall');
7
console.error(err);
8
});
Copied!
This will launch the AdjoeActivity displaying the adjoe ad feed. The returned promise resolves when the call to Android's startActivity has been made (note that this does not necessarily mean that Playtime has actually been launched) and rejects with an error parameter when an error occurred while attempting to launch Playtime. If you need to know in advance whether the user will be able to access Playtime 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 launch Playtime for the user and false otherwise.
Before the user can interact with the partner apps on the ad feed, 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 launch Playtime:
1
Adjoe.showOfferwall({
2
'uaNetwork': "uaNetwork_value",
3
'uaChannel': "uaChannel_value",
4
'uaSubPublisherCleartext': "uaSubPublisherCleartext_value",
5
'uaSubPublisherEncrypted': "uaSubPublisherEncrypted_value",
6
'placement': 'placement_value'
7
});
Copied!

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.
1
Adjoe.sendEvent(Adjoe.EVENT_TEASER_SHOWN, null, {'<adjoeParams>'});
Copied!

Best practices for teaser_shown event

It's always good to check if Playtime can be launched for the user before showing the teaser button.
1
if (Adjoe.canShowOfferwall()) {
2
// Show the teaser button.
3
Adjoe.sendEvent(Adjoe.EVENT_TEASER_SHOWN, null, {'<adjoeParams>'});
4
}
Copied!
Last modified 2mo ago