PluginAppodeal: how to handle rewarded video callbacks

Hello,

I dont understand how should I deal with the Rewarded Video callbacks.

I can see that AppodealListener has this method:

onRewardVideoDidFinish(int amount, const std::string& name)

So, If the player watches the ad until the end, this method will be called, right?

But, what if he skip the video?

So, how could I know if I should give him the reward or not?

:onRewardVideoWillDismiss() doesn’t seems to deal with the skip action, because it’s called everytime the video ends, if I got this right.

I guess @yinjimmy could help me? :grimacing:

Anyone ?
I saw that PluginAdmob has a similar listener class and I couldn’t figure out how to know when to give the reward there too .

OK, I found out that onRewardVideoDidFinish(int amount, const std::string& name) will always happens before :onRewardVideoWillDismiss(). So I used :onRewardVideoDidPresent() to set a flag to false . So, if when the user watches the video until the end ,onRewardVideoDidFinish(int amount, const std::string& name) is called an there I set the flag to true . Then, in :onRewardVideoWillDismiss() I check if the flag is true or false, to decide if I should give him the reward or not. I don’t know if this is the correct way, but seems to work.

But now, I got a lot of error messenger (toasts) showing in the app.

Seems like this plugin is very outdated.

I will open another topic to try to solve this problem, showing my build.gradle, when I get home, but is there any chance to update this plugin soon?

Thank you.

I’m sorry for late because of Chinese New Year.

http://docs.sdkbox.com/en/plugins/appodeal/v3-cpp/#sdk-version

Any chance of updating this pluging anytime soon? :grimacing:

for iOS, just replace https://www.appodeal.com/sdk/choose_framework with appodeal.framework if it’s api not change.