Rewards

You can get information about the rewards that the user has collected as well as about how many rewards are available for payout and how many the user has already spent.

To do so call

import io.adjoe.sdk.AdjoeRewardsEvent;

...

private function requestAdjoeRewards():void {
  adjoe.addEventListener("onRewardsReceived", onRewardsReceived);
  adjoe.addEventListener("onRewardsError", onRewardsError);

  adjoe.requestRewards();
}

private function onRewardsReceived(event:AdjoeRewardsEvent):void {
  trace("Received adjoe rewards. Reward = " + event.getReward() +
      ", availablePayoutCoins = " + event.getAvailablePayoutCoins() +
      ", alreadySpentCoins = " + event.getAlreadySpentCoins());
}

private function onRewardsError(event:AdjoeRewardsEvent):void {
  trace("Adjoe rewards error: " + event.getErrorMessage());
}

This operation will fail if the SDK is not initialized, the user has not accepted the adjoe Terms of Service or is blocked by the adjoe services.

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.requestRewards(adjoeParams);

Last updated