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
window.AdjoePlugin.showOfferwall(
2
function() {
3
// the offerwall was displayed to the user
4
},
5
function(err) {
6
// the offerwall cannot be displayed
7
},
8
);
Copied!
This will launch the AdjoeActivity displaying the adjoe ad feed. IIf you need to know in advance whether the user can access Playtime or not, you can call window.AdjoePlugin.canShowOfferwall(function, function). This method will invoke the success callback if you can launch Playtime for the user and invoke the error callback 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.
Sub-IDs You can pass two optional Sub-IDs when you launch Playtime, which will be logged every time a user views or clicks a campaign: window.AdjoePlugin.showOfferwallWithSubIDs('<subId1>', '<subId2>', success, error).

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
window.AdjoePlugin.sendUserEvent(window.AdjoePlugin.EVENT_TEASER_SHOWN, '<subId1>', '<subId2>');
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
window.AdjoePlugin.canShowOfferwall(
2
function() {
3
// show teaser button
4
window.AdjoePlugin.sendUserEvent(window.AdjoePlugin.EVENT_TEASER_SHOWN, '<subId1>', '<subId2>');
5
},
6
function() {
7
//can't show the offerwall
8
}
9
);
Copied!