Closed hasen6 closed 7 years ago
The API for interstitials is not quite ready yet, so there is no way to add rewarded interstitials right now.
If you have any proposals for an API don't hesistate to jump in the discussion in #6.
Do you mean your plugin is not ready or the Google admob API itself is not ready? I realise its very new, it only came out about a month or so ago.
But ordinary interstitials are already working aren't they? They certainly seem to be for me at least.
My plugin is not ready. Ordinary interstitials are already working on iOS and android but I want to extend the API soon.
I'd love to see this implemented. Is there any way I can help? I'm not the greatest programmer but I'd be willing to do any testing or whatever you need.
As far as I can tell the only difference between normal and rewared interstitials are mediation networks and the class you call the method on?
I can imagine exposing a second module in the react-native-admob package which is almost the same as the ordinary interstitials. Shouldn't be too hard! The most difficult task with this react-native module is always finding a common API for iOS and Android.
But testing would be great :) I will get in touch with you when it's ready!
Ok hope you can figure it out. Really great that you provide this plugin. Certainly I can help with any testing or anything else you need me for.
Update:
I tried setting up a rewarded ad but seems like you need a mediation network even to really test it. Do you have access to one?
With a google test id I only got a black ad with no video and whenever I add a test device id I get an error Request Error: No ad to show
.
So I guess it would work if I had setup a network supporting rewarded ads but I'm not sure. After I publish the new interstitial API I can commit the code to another branch for you to test!
You just need an account with some other Ad networks right? I haven't tried it yet but I remember I signed up to Chartboost and Flurry in the past.
Btw I got everything working on Android in the end. I don't know exactly what it was but my general unfamiliarity with Android in general probably had a lot to do with it.
Any progress with this...or is it a dead end?
I'm quite busy these days but I think I can get something running at the end of the week or next week!
I guess you must be very busy hehe.
Implementation of rewarded interstitials would be awesome. Any news on this?
Same to me!
@sbugert I am not familiar with java, so I can't help with the coding. But I can help documenting or testing. Also, I've enabled some mediation networks on my AdMob account, I can provide any details you need.
I am so desperate that I even tried taking a look at the code but, god, java code looks complicated to me. Is there any way I can help you so that we can get rewarded videos working? :)
Hey I'm the designated tester. That job is taken. :)
Btw its not Java, React is Javascript.
@hasen6 I just wanted to say I am ready to help when needed.
And by Java, I meant the native module for Android.
I added a new branch (rewarded-video) to the repo with a first iOS version that is ready to be tested.
Of course, the more testers the better! (Btw react is javascript, the react-native bridge is platform-specific code so either Objective-C or Java which are the two languages most of the code of this project lives)
git checkout rewarded-video
npm i
in the Example folder@sbugert Great! I can't wait to test it! And I will post the feedback after test.
Hi @sbugert , Did you forgot to check in a js file like "RNAdMobRewarded.js". I try to run the Example project follow your instructions, but It show me "Cannot read property 'setTestDeviceID' of undefined" while execute code:
AdMobRewarded.setTestDeviceID('EMULATOR').
after replace
import { AdMobRewarded } from 'react-native-admob';
with
const {RNAdMobRewarded:AdMobRewarded} = NativeModules;
It show me another error message: "AdMobRewarded.addEventListener is not a function"
@sbugert Please review the commit @7ad8ea0165c1f03fbaad253a1535264c0390a03d
You are right, I forgot the file!
Should be there now :)
and the index.js ? :)
Sorry! Should be there now :)
It's confusing because I do the development in another folder and have to copy files around.
@sbugert Thank you for your rapid support
Did anybody manage to get a rewarded video displayed? I get "No ad to show" no matter I do.
Have you correctly setup the mediation for the network you're using? And are rewarded ads enabled in said network?
On 02.08.2016, at 17:42, Gökhan Sarı notifications@github.com wrote:
Did anybody manage to get a rewarded video displayed? I get "No ad to show" no matter I do.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@sbugert Actually, my application is for Android only. So all my accounts and such are configured that way.
I created a test iOS application and tried the account data of my android app on this new test application. I did my tests mainly on Chartboot and;
And when I built and run the application, I got the "no ad to show" error. At this point, I am sot sure if there is a problem with the library or Chartboost doesn't provide an ad since it expects my application to be from Android.
When I get some time, I'll try to create a new test app account for iOS on both AdMob and mediation network and try to test with the new data.
BTW, is there any progress about Android?
I am so excited, I got it working! I think the problem was about the iOS version I am testing. It was 7.0 (which is the XCode's default). I spent literally hours trying to integrate different SDKs from different mediation networks. A few minutes ago, a network's SDK I tried required a higher iOS version and I upgraded to 9.3 and video got loaded.
I can't wait to integrate it into my android application! @sbugert help me out :)
So it only works on iOS 9?
@hasen6 I don't think it is about react-native-admob. To use rewarded videos from mediation networks, you need to integrate those networks' SDKs. I think if there is a iOS version restriction, those SDKs are the cause.
So only certain networks could be incompatible.
I tried adding Android native module for rewarded ads trying to abide interstitial ads module. But I couldn't get it working, got this error:
can't create handler inside thread that has not called looper.prepare()
Can someone with Java skills have a look please? Code is here:
Great that it worked :) I will take a look at the android version on the weekend!
So, I just merged @th0th's java code into the rewarded-video branch!
Would be good if we did some more testing. @xing-zheng, did you succeed in running the iOS version yet? Then we only need documentation and I will merge the branch and publish it to npm.
is this ready to go?? :)
Hi! @sbugert can I help you with anything? I would love to see this merged :)
Would love to get this working, need any help?
I'll try to release this https://github.com/sbugert/react-native-admob/pull/80 today!
Just merged #94
Published https://github.com/sbugert/react-native-admob/releases/tag/v1.2.0
Please feel free to ping me if anything is wrong.
Just wondering if the 'rewarded interstitials' work? If so how would that be implemented - the same as a normal interstitial?