public interface

AppLovinAdRewardListener

com.applovin.sdk.AppLovinAdRewardListener

Class Overview

This interface defines a listener intended to be notified when a user watches a rewarded video, and the SDK has received a response from the AppLovin server either validating or rejecting their virtual currency reward.

Summary

Public Methods
abstract void userDeclinedToViewAd(AppLovinAd ad)
This method will be invoked if the user selected "no" when asked if they want to view an ad.
abstract void userOverQuota(AppLovinAd ad, Map<String, String> response)
This method will be invoked if the user has already received the maximum allocated rewards for the day.
abstract void userRewardRejected(AppLovinAd ad, Map<String, String> response)
This method will be invoked if the user's reward was detected as fraudulent and not awarded.
abstract void userRewardVerified(AppLovinAd ad, Map<String, String> response)
If you are using reward validation for incentivized videos, this method will be invoked if we contacted AppLovin successfully.
abstract void validationRequestFailed(AppLovinAd ad, int errorCode)
This method will be invoked if we were unable to contact AppLovin, therefore no ping will be heading to your server.

Public Methods

public abstract void userDeclinedToViewAd (AppLovinAd ad)

This method will be invoked if the user selected "no" when asked if they want to view an ad. If you've disabled the pre-video prompt in the "Manage Apps" UI on our website, then this method won't be called.

public abstract void userOverQuota (AppLovinAd ad, Map<String, String> response)

This method will be invoked if the user has already received the maximum allocated rewards for the day.

Parameters
ad An ad for which a validation request was submitted.
response Any response extras sent down by AppLovin.

public abstract void userRewardRejected (AppLovinAd ad, Map<String, String> response)

This method will be invoked if the user's reward was detected as fraudulent and not awarded.

Parameters
ad An ad for which a validation request was submitted.
response Any response extras sent down by AppLovin.

public abstract void userRewardVerified (AppLovinAd ad, Map<String, String> response)

If you are using reward validation for incentivized videos, this method will be invoked if we contacted AppLovin successfully. This means that we will be pinging your currency endpoint shortly, so you may wish to refresh the user's coins from your server.

Parameters
ad An ad for which a validation request was submitted.
response Any response extras sent down by AppLovin. Typically, this includes the keys "currency" and "amount", which point to Strings containing the name and amount of the virtual currency to be awarded.

public abstract void validationRequestFailed (AppLovinAd ad, int errorCode)

This method will be invoked if we were unable to contact AppLovin, therefore no ping will be heading to your server.

Parameters
ad An ad for which a validation request was submitted.
errorCode An error code indicating the cause of failure. Common error codes are defined in AppLovinErrorCodes.