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

public function showAdjoeOfferwall():void {
  // the listeners are optional
  adjoe.addEventListener("onShowOfferwallSuccess", onShowOfferwallSuccess);
  adjoe.addEventListener("onShowOfferwallError", onShowOfferwallError);

  adjoe.showOfferwall();
}

private function onShowOfferwallSuccess(event:Event):void {
  trace("Adjoe offerwall show succeeded");
}

private function onShowOfferwallError(event:Event):void {
  trace("Adjoe offerwall show failed");
}

This will launch the AdjoeActivity displaying the regular adjoe offerwall. Note that the onShowOfferwallSuccess event is sent when the start of the activity was requested and does not necessarily mean that the offerwall is ready. To track this event, you can add an additional offerwall listener:

import io.adjoe.sdk.AdjoeOfferwallEvent;

...

public function showAdjoeOfferwall():void {
  // the listeners are optional
  adjoe.addEventListener("onShowOfferwallSuccess", onShowOfferwallSuccess);
  adjoe.addEventListener("onShowOfferwallError", onShowOfferwallError);

  adjoe.addEventListener("onOfferwallOpened", onOfferwallOpened);
  adjoe.addEventListener("onOfferwallClosed", onOfferwallClosed);

  adjoe.showOfferwall();
}

private function onShowOfferwallSuccess(event:Event):void {
  trace("Adjoe offerwall show succeeded");
}

private function onShowOfferwallError(event:Event):void {
  trace("Adjoe offerwall show failed");
}

private function onOfferwallOpened(event:AdjoeOfferwallEvent):void {
  trace("Opened adjoe offerwall with type " + event.getOfferwallType());
}

private function onOfferwallClosed(event:AdjoeOfferwallEvent):void {
  trace("Closed adjoe offerwall with type " + event.getOfferwallType());
}

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 true if the user can see 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. The offerwall also provides the user with a possibility to accept the adjoe Terms of Service.

Adjoe Parameters

You can pass additional UA and placement parameters when you launch Playtime:

var adjoeParams:AdjoeParams = new AdjoeParams();
adjoeParams.setUaNetwork("uaNetwork");
adjoeParams.setUaChannel("UaChannel");
adjoeParams.setUaSubPublisherCleartext("UaSubPublisherCleartext");
adjoeParams.setUaSubPublisherEncrypted("UaSubPublisherEncrypted");
adjoeParams.setPlacement("Placement");

adjoe.showOfferwall(adjoeParams);

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.sendUserEvent(AdjoeSDK.EVENT_TEASER_SHOWN, "<subId1>", "<subId2>");

Last updated