パッケージの詳細

react-native-admob-native-ads

ammarahm-ed3.3kMIT0.7.6

A simple and robust library for creating & displaying Admob Native Ads in your React Native App using Native Views

android, ios, react-native, admob

readme

If you are working on a React Native Application, you might feel limited when it comes to displaying ads that look beautiful and match your app's look and feel. Usually when you show ads in your app, they are loaded inside a WebView and that is why you cannot modify them except changing the width and height in some cases.

How is this library different?

We on the other hand do not load ads in a WebView. We use a more complex, Native Advanced ad format to display ads. We request Admob servers to send us the ad information such as images, headlines, videos etc. Then we send this information over the bridge to React Native and render it in React Native's View and Text components execpt a few exceptions where we use our own custom components.

Can I design the ads myself?

Yes absolutely you can! There are no limitations. You can design ads that look just like your App's design and colors.

I need other ad formats too, which library do you recommend?

There are a bunch of projects trying to figure out showing ads on react-native. Most are not maintained properly. I would recommend that you use react-native-admob/admob by @wjaykim. Banners, Interstitials, AdOpen and Rewarded, Rewarded Interstital ads are supported.

Features

  1. Admob Native Advanced Ads format
  2. Cross Platform (iOS and Android)
  3. Identical Working on both platforms
  4. You can create your ads from ground up as you desire, no limits.
  5. No need to manage any .xml or .xib layout files!
  6. AutoRefresh ad at specific intervals
  7. Support for Video Ads
  8. Ad Mediation (Especially Facebook Ads Mediation(Video & Banners))
  9. Ad Targeting
  10. Typescript definitions

Installation

Links

Old documentation

If you are looking for the documentation for version 0.3.9 and below, head here

Sponsor this project

It costs me alot of time to keep the library updated and address all the bugs & issues. If this library has helped you support me on patreon.

Contact & support

  • Add a ⭐️ star on GitHub to support the project!
  • Create a GitHub issue for bug reports, feature requests, or questions
  • Follow @ammarahm-ed for announcements

Contribute

That is awesome news! There is alot happening at a very fast pace in this library right now. Every little help is precious. You can contribute in many ways:

  • Suggest code improvements on native iOS and Android
  • If you have suggestion or idea you want to discuss, open an issue.
  • Open an issue if you want to make a pull request, and tell me what you want to improve or add so we can discuss
  • I am always open to new ideas

License

This library is licensed under the MIT license.

Copyright © Ammar Ahmed (@ammarahm-ed)

# Notesnook Logo

更新履歴

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,

[0.3.8] - 2020-11-17

Fixed

  • Fixed ref warning in StarRatingView

[0.3.7] - 2020-11-17

Added

  • A custom StarView for our library by @mrousavy

Fixed

  • Fixed incorrect child view mounting on Android
  • Fixed rendering ads in a FlatList.
  • Fixed CallToActionView not clickable
  • Fixed new ref created on each rerender
  • Fixed typings for AdManager @mrousavy
  • Fixed state updating when NativeAdView is not mounted @jaeyoonlim

Changed

  • Let ads update to any compatible version (19.+) on Android. @halaei
  • Rewrite the example to demonstrate Banner Ad, Video/Image Ad & Ads in a List properly.
  • Rename MediaView to RNGADMediaView to avoid conflicts with other libraries
  • CallToAction now uses a simple Text Component to register clicks.

Removed

  • react-native-star-rating dependancy has been removed
  • react-native-gesture-handler dependancy has been removed.
  • delayAdLoading prop has been removed @ha-younes72

[0.3.6] - 2020-08-21

Added

  • Use callable module on Android to receive onUnifiedNativeAdLoaded event so ad renders in its correct view using a unique ID.

Fixed

  • Use a partial implementation for ImageProps. @Nox04
  • Fix rendering of multiple ads in a FlatList. #51
  • Try to reload ad when it fails to load after the specified refreshInterval
  • Fix CallToActionView assigned on AdvertiserView on Android. #57
  • Refactor and cleanup the code.

Changed

  • Rewrite the example to demonstrate Banner Ad, Video/Image Ad & Ads in a List properly.
  • Rewrite the Root NativeAdView component as a Class Component
  • Wrap CallToActionView in GestureHandlerRootView @mrousavy
  • Hide the Ad when it is loading by default so it does not show empty components.
  • Fix NPM dependencies by using peerDependencies, now you have to manually add all the dependancies of the library @mrousavy Fixed #55
  • You need to add react-native-star-rating as a direct dependency of the main project from now onwards.