Rewarded Video
Rewarded video listeners
For the use of rewarded video, listeners are very important to be able to reward the user for having seen the video in its entirety.
In order to listen to the events, we establish a listener with the rewardedVideo.setListener() method:
rewardedVideo.setListener(new TappxRewardedVideo() {
@Override
public void onRewardedVideoLoaded(TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoLoaded");
}
@Override
public void onRewardedVideoLoadFailed(TappxRewardedVideo rewardedVideo, TappxAdError tappxAdError) {
Log.v("Tappx", "Tappx: onRewardedLoadFailed");
}
@Override
public void onRewardedVideoStart(TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoStart ");
}
@Override
public void onRewardedVideoClicked(TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoClicked");
}
@Override
public void onRewardedVideoPlaybackFailed(TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoPlaybackFailed");
}
@Override
public void onRewardedVideoClosed (TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoClosed");
}
@Override
public void onRewardedVideoCompleted (TappxRewardedVideo rewardedVideo) {
Log.v("Tappx", "Tappx: onRewardedVideoCompleted");
}
});
You can also use the following methods in order to add text messages in the Pop-Up or Countdown:
setPopupMessage allows you to configure text messages in the Pop-Up.
rewardedVideo.setPopupMessage("Text Message","Text Button Accept","Text Button Cancel");
setCountdownMessage allows you to configure text messages in the Countdown.
rewardedVideo.setCountdownMessage("Text Before Numbers","Text After Second Numbers");
Tappx © 2024