Reward Videos



Rewarded Video: Unity (C#)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
bool isReady = FGLEnhance.IsRewardedAdReady();
2) Show the ad:
FGLEnhance.ShowRewardedAd (FGLEnhance.REWARDED_PLACEMENT_NEUTRAL, OnRewardGranted, OnRewardDeclined, OnRewardUnavailable);
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Android (Java)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
boolean isReady = FglEnhance.isRewardedAdReady();
2) Set callbacks:
final RewardCallback rewardCallback = new RewardCallback() {
    @Override
    public void onRewardGranted(int rewardValue, RewardType rewardType) {}

    @Override
    public void onRewardDeclined() {}

    @Override
    public void onRewardUnavailable() {}
};
3) Show the ad:
FglEnhance.showRewardedAd(rewardCallback);
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: iOS (Objective-C)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
bool isRewardedAdReady = [[FglEnhance sharedInstance] isRewardedAdReady];
2) Show the ad:
[[FglEnhance sharedInstance] showRewardedAd:self];
3) Implement RewardedDelegate:
-(void)onRewardGranted:(int)rewardValue rewardType:(RewardType)rewardType { }

-(void)onRewardDeclined { }

-(void)onRewardUnavailable { }
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: OpenFL (Haxe)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
var isReady:Bool = Enhance.isRewardedAdReady();
3) Show the ad:
Enhance.showRewardedAd(onRewardGranted, onRewardDeclined, onRewardUnavailable);
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Adobe Air (AS3)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
var isReady:Boolean = FglEnhance.isRewardedAdReady();
2) Show the ad:
FglEnhance.showRewardedAd(onRewardGranted, onRewardDeclined, onRewardUnavailable);
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Defold (Lua)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
is_ready = enhance.isRewardedAdReady()
2) Show the ad:
enhance.showRewardedAd(on_reward_granted, on_reward_declined, on_reward_unavailable)
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Construct 2 (Visual)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Actions
[Show Rewarded Ad]
Try to show a rewarded ad. 2) Conditions
[On Rewarded Ad success]
Triggered when the ad is available and successfully displayed.
[On Rewarded Ad failed]
Triggered when Enhance failed to show the ad (e.g. received no fill error from the ad network).
[On Reward granted]
Triggered when the reward was granted to the user.
[On Reward declined]
Triggered when the reward was declined by the user.
[On Reward unavailable]
Triggered when the reward is unavailable. 3) Expressions
[Last Reward Type]
Type of the latest granted reward. You can use it after [On Reward granted] is triggered. Returns "item" or "coins".
[Last Reward Value]
Value of the latest granted reward. You can use it after [On Reward granted] is triggered. Returns number value.

Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Cordova (JS)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Check whether any ad is available:
Enhance.isRewardedAdReady(isReadyCallback);
2) Show the ad
Enhance.showRewardedAd(onRewardGranted, onRewardDeclined, onRewardUnavailable);
Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.

Rewarded Video: Stencyl (Visual)




Rewarded Ads are usually video ads which pay high CPM for the users who view them in return for an in-game reward.

1) Action Blocks
[show rewarded ad]
Show rewarded ad if any is available.

2) Normal Blocks
[is rewarded ad ready] -- returns boolean
Check whether a rewarded ad is available or not. You can connect this with [if] block to be sure an ad is ready before displaying it.
[last reward type] -- returns text
Access type of the last reward. This will return "ITEM" or "COINS".
[last reward value] -- returns number
Access value of the last reward. This will return 0 if the reward type was "ITEM".
[reward type: ...] -- returns text
You can use this block to use "ITEM" and "COINS" strings without entering them manually. (helper block)

3) Wrapper Blocks
[on reward granted]
Define actions which are triggered after the reward is granted to the user. You can use [last reward type] and [last reward value] together with this block.
[on reward declined]
Define actions which are triggered after the reward is declined by the user.
[on reward unavailable]
Define actions which are triggered after the reward is unavailable.

Note:
Rewarded ads will automatically interrupt the flow of your application until the user completes interaction with the ad.