Rewarded Ads
Rewarded ads are an engaging ad format that shows a short video ad to the user and in exchange the user will earn a reward. The user must consent and watch the video completely through to the end in order to earn the reward.
Making the Request
The following example shows how to make a request to display the Rewarded ads.
Before you can make a request to display a Rewarded ad, you must import the Rewarded class.
import com.fyber.fairbid.ads.Rewardedimport com.fyber.fairbid.ads.Rewarded;After importing the Rewarded class, you must make a request to display the Rewarded ads.
import com.fyber.fairbid.ads.Rewarded
val placementId = "12345"
Rewarded.request(placementId)import com.fyber.fairbid.ads.Rewarded;
String placementId = "12345";
Rewarded.request(placementId);FYBRewarded.delegate = MyRewardedDelegate()
let placementId = "1234"
FYBRewarded.request(placementId)/codeFYBRewarded.delegate = MyRewardedDelegate()
let placementId = "1234"
FYBRewarded.request(placementId)string placementId = "1234";
Rewarded.Request(placementId);Adding Callbacks
The callback code below is required for SDK to track the activity of your ad properly.
Example showing an ad
The following example checks to see if a placement is available and, if it is, uses the show request to display the ad.
If your game needs to be paused before showing an ad (e.g., stop audio playback), this is the best moment to do so. The time between calling this API and the ad actually being shown should be negligible. This approach is preferable to relying on the 'OnShow' callback since, we cannot guarantee it will be called on Android before the ad starts playing.
Server-Side Rewarding
Refer to the provided documentation for detailed instructions on configuring Server-Side Rewarding.
Refer to the provided documentation for detailed instructions on configuring Server-Side Rewarding.
When using Unity, due to technical limitations on the framework side, we notice that for some very low percentage of users, we receive the OnShowFailure followed by the OnCompletion(true). We're currently working on fixing the issue. However, in the meantime, if you're using client-side rewarding and you consider the OnShowFailure as a callback to trigger a new request and unblock your game's logic, we recommend you delay this check with the following workaround:
Last updated

