Reputation: 73
Hi guys im using the library for react native admob, however does anyone know how I can enable people to click on an ad through a button. For example enter full screen on a video I would like to implement an ad press on that. Although, how do I go about doing that? so far the library on gives code to display ad banner.
https://github.com/sbugert/react-native-admob
<AdMobBanner
adSize="fullBanner"
adUnitID="your-admob-unit-id"
testDevices={[AdMobBanner.simulatorId]}
onAdFailedToLoad={error => console.error(error)}
/>
Upvotes: 1
Views: 2048
Reputation: 3977
Those are called rewarded video ads. Not banners. To do what you want the code looks something like this:
// Set up the rewarded ad
AdMobRewarded.setAdUnitID('your-admob-unit-id');
AdMobRewarded.requestAd()
....
// Start the video ad
setTimeout(() => { // Connect this to a function instead of a timeout obviously
AdMobRewarded.showAd()
}, 5000)
See the https://github.com/sbugert/react-native-admob
plugin for full examples on the code usage.
Upvotes: 1
Reputation: 836
To my knowledge it is not possible to add your own design on banners. I played around a little with reac-native-admob then did some basic work with a similar package from facebook react-native-fbads. My experience was that the later was a little more flexible. However I don't think they become nicer then the original from admob. But at least you could add the button.
Upvotes: 0