Show Rewarded Ad
val customData = "<<Publisher can set any string e.g. streakId>>"
Arcplay.showRDAd(this, customData, object :
RewardedAdEventListener {
override fun onAdNotReady() {
Log.i("UnlockWithAds", "Ad not ready")
// Rewarded ad is not loaded yet, or ArcPlay init is not successful yet
// ArcPlay recommends that you retry with exponentially higher delays
}
override fun onAdDisplayFailed() {
Log.i("UnlockWithAds", "Ad failed to display")
// Rewarded ad was loaded successfully but failed to display
// ArcPlay recommends that you retry with exponentially higher delays
}
override fun onAdDisplayed() {
Log.i("UnlockWithAds", "Ad displayed")
// Rewarded ad was displayed successfully
// ArcPlay recommends that you pause the user flow
}
override fun onAdClicked() {
Log.i("UnlockWithAds", "Ad clicked")
// User clicked on rewarded ad and user went out of the app
}
override fun onAdDismissed() {
Log.i("UnlockWithAds", "Ad dismissed")
// User dismissed the rewarded ad
// ArcPlay recommends that you resume the user flow
}
override fun onUserRewarded() {
Log.i("UnlockWithAds", "User rewarded")
// User should receive the reward
// ArcPlay shall send the s2s callback for processing the reward
}
})
}Param
Type
Description
Last updated