-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [WIP] Native Ad Support #650
base: main
Are you sure you want to change the base?
Conversation
To view this pull requests documentation preview, visit the following URL: docs.page/invertase/react-native-google-mobile-ads~650 Documentation is deployed and generated using docs.page. |
Amazing work so far @wjaykim. So this means you don't have to create a template in Xcode right? |
@dylancom Yes it is. It will work just by writing jsx. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjaykim shows up from nowhere after a long time and just drops native ad support 😆
🏆
Hello! Tell me how to show advertising images? |
When will this be merged we need it :) |
@goxr3plus easy to use patch-package to integrate it, please provide testing and feedback, that is very very useful when it comes to merging PRs. Can't give any ETAs whatsoever (it's open source!) but it is marked as draft, so at least for me, it's not ready. Only @wjaykim can say otherwise since they are the benevolent author that provided the code |
1b39cf8
to
87499ca
Compare
87499ca
to
6574016
Compare
@wjaykim You are doing an amazing work i have checked the file changes and the quality is top 🔝. Thank you so much for your effort |
e67497c
to
21a4c15
Compare
21a4c15
to
bb35abc
Compare
#ifdef RCT_NEW_ARCH_ENABLED | ||
GADMediaView *mediaView = ((RNGoogleMobileAdsMediaView *)view).contentView; | ||
#else | ||
GADMediaView *mediaView = (RNGoogleMobileAdsMediaView *) view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is inserted an extra parenthesis.
It should be GADMediaView *mediaView = (RNGoogleMobileAdsMediaView *)view;
hi @goxr3plus , may you give me a guide how to patch-package with native ads and using them in your project. Thanks |
I am still waiting it to be on the main branch official, i haven't patched or used this as it's work in progress, probably it's finalized soon |
Is there any way to use it? |
@Aporial there is but you (or anyone that wants to use it) needs to be careful and know what they are doing, yes? Has to be said :-) But the tree is visible here: The last commit shared with main is So: in your package.json That (or maybe something very similar to that, if the paths in the diffs are wrong in step 3, or if I had a typo somewhere), should get you a published stable commit of main repo, with the PR diff layered on top, if you want to test it and provide feedback |
I'm still working on it, there's still not implemented features(such as controlling video, receiving events...), and also I have to update documentation before I can say it's ready for review. I have no particular motivation for this work, but just for voluntary purposes. And since this is not my main job, it's hard to allocate my resource fully on this PR(especially these year-end days). Sorry to those who are waiting, but �I'm trying to and wish to end-up this PR ASAP, fyi. |
If it shows an image, title, description and a button - that's great) |
107d7be
to
6c186c7
Compare
Description
Initial Native Advanced Ad Support
References
Concepts
Headless
NativeAsset
componentUnlike previous RNAdmobNativeAd did, this implementations offers headless
NativeAsset
component.NativeAsset
component is for registering 'asset view' to Native Ad, which allows the SDK to automatically handle tasks such as recording clicks, recording impressions, ... by wrapping the asset view. It does not have UI implementation, so App Developers must implement UI as for their needs. By doing this, we can make app developers customize their complex Native Ad style more easily.For example:
SoC for Ad Instance and Ad View
Unlike BannerAd did, I separated process of loading ad and displaying ad respectively. Native Ad is more complex than Banner Ad, because:
Related issues
Release Summary
Checklist
and followed the process outlined there for submitting PRs.
Android
iOS
e2e
tests added or updated in__tests__e2e__
jest
tests added or updated in__tests__
Test Plan
Think
react-native-google-mobile-ads
is great? Please consider supporting the project with any of the below:Invertase
on Twitter