Skip to content

feat(native ads): Add support for onPaidEvents on Android/iOS#787

Merged
dylancom merged 29 commits intoinvertase:mainfrom
malandr2:malandr2-patch-2
Aug 21, 2025
Merged

feat(native ads): Add support for onPaidEvents on Android/iOS#787
dylancom merged 29 commits intoinvertase:mainfrom
malandr2:malandr2-patch-2

Conversation

@malandr2
Copy link
Contributor

@malandr2 malandr2 commented Aug 19, 2025

Description

Adding react support to forward onPaidEvents in the Android/iOS layer to React. React pubs can now subscribe to these events in the React layer

// Add the event listener for the paid event
nativeAd.addAdEventListener(NativeAdEventType.PAID, (payload) => {
  console.log('Ad received revenue!', payload);
  // payload will be: {"currency": "USD", "precision": 1, "value": 12345}
});

Related issues

Release Summary

Checklist

  • I read the Contributor Guide
    and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in __tests__e2e__
    • jest tests added or updated in __tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-google-mobile-ads is great? Please consider supporting the project with any of the below:

  • 👉 Star this repo on GitHub ⭐️
  • 👉 Follow Invertase on Twitter

@docs-page
Copy link

docs-page bot commented Aug 19, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/react-native-google-mobile-ads~787

Documentation is deployed and generated using docs.page.

Copy link

@ericleich ericleich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM from GMA SDK implementation perspective.

@dylancom dylancom force-pushed the main branch 2 times, most recently from 6afefbe to ae82e21 Compare August 20, 2025 11:08
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ malandr2
❌ semantic-release-bot
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.34%. Comparing base (a34c7ba) to head (ed043ab).
⚠️ Report is 160 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #787      +/-   ##
==========================================
- Coverage   43.72%   36.34%   -7.37%     
==========================================
  Files          30       37       +7     
  Lines         549      677     +128     
  Branches      151      180      +29     
==========================================
+ Hits          240      246       +6     
- Misses        309      431     +122     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@malandr2
Copy link
Contributor Author

@dylancom what's the best to proceed to resolve the the codecov checks?

@dylancom
Copy link
Collaborator

@malandr2 for now we can ignore the codecov checks.
Is the PR ready?

@malandr2
Copy link
Contributor Author

@malandr2 for now we can ignore the codecov checks. Is the PR ready?

Yup, it's ready 👍

Copy link
Collaborator

@wjaykim wjaykim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dylancom dylancom merged commit 5ba40a2 into invertase:main Aug 21, 2025
9 of 11 checks passed
@mikehardy
Copy link
Collaborator

🎉 This PR is included in version 15.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants