Ask about Admob rewarded Video?

Hi, i have opened the example from github

https://github.com/sdkbox/sdkbox-sample-admob/blob/master/cpp/Classes/HelloWorldScene.cpp

I dont know how to implement the Reward function. i think, this function will be called when the video is being watched until finish. But, i dont know how

    virtual void reward(const std::string &name, const std::string &currency, double amount) {
    if (showText) {
        totalCoins += amount;
        showText(StringUtils::format("%s name=%s currency=%s amount=%lf total=%d",
                                     __FUNCTION__, name.c_str(), currency.c_str(), amount, totalCoins));
    }
}
  1. create reward with AdMob panel. https://apps.admob.com/
  2. set the reward id https://github.com/sdkbox/sdkbox-sample-admob/blob/master/cpp/Resources/sdkbox_config.json#L39
  3. show reward video when it’s ready. https://github.com/sdkbox/sdkbox-sample-admob/blob/master/cpp/Classes/HelloWorldScene.cpp#L142

Thanks,

then, how to the game know that user watch the ads until finish or not? in the Listener, there are method name “adViewDidDismissScreen”. it will call when user close the ads even thought the user cancel the ads, right?

Can SDKBOX use listener like this?
https://developers.google.com/android/reference/com/google/android/gms/ads/reward/RewardedVideoAdListener

ok, I’ll add the callbacks.

OK, thank you very much. I will wait ::+1:

test, but it seems there are a bug with AdMob iOS SDK:

- (void)rewardBasedVideoAdDidCompletePlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd {

never called.
the other delegate works.

Oh, sorry its my mistake. I am not fully understand the use of the listener before. Actually, the “reward” listener automatically be called when user watch the ads until finish. i thought that “reward” just function in class listener.

Sorry for my poor Programming skill :frowning:.
and thank you for response my problem :slight_smile:

                  === Sugestion ===

please add void reward in the SDKBOX Docs