sbugert / react-native-admob

A react-native component for Google AdMob banners
BSD 2-Clause "Simplified" License
1.13k stars 531 forks source link

RewardedVideoDidRewardUser callback is not working in Unity Android SDK. #126

Open rohitgoyal opened 7 years ago

rohitgoyal commented 7 years ago

Hi In case of Unity android mediation I am getting the callback of rewardedVideoDidRewardUser. Note: That it works in case of Unity iOS mediation and Adcolony mediation for both the platforms.

rohitgoyal commented 7 years ago

@sbugert

akrisanov commented 7 years ago

I have the same problem on iOS (not Unity). I set the callback in componentDidMount():

AdMobRewarded.addEventListener('rewardedVideoDidRewardUser', (type, amount) => 
    console.log('rewardedVideoDidRewardUser', type, amount)
);

Ad video has been played, but I didn't see any console logs.

yarn.lock:

react-native@0.42.0:
  version "0.42.0"
...
react-native-admob@^1.3.0:
  version "1.3.0"
  resolved "https://registry.yarnpkg.com/react-native-admob/-/react-native-admob-1.3.0.tgz#7f313c28a9b8bebeee410ba8fbab920315750b03"
booboothefool commented 7 years ago

@rohitgoyal Sorry I do not know the answer, but it is possible to use react-native-admob mediation and hook up AdColony/Unity for videos? Do I just need to include the mediation adapter and set the appropriate ids in AdMob dashboard, or do I need to include the AdColony/Unity SDK as well?

rohitgoyal commented 7 years ago

@booboothefool Yes. You have to include the network SDKs as well.

RockyF commented 7 years ago

@akrisanov I resolve it. I guess you requestNextAd before current ads closed. so, you just request next ad in current ads closed event callback. 😊