react-native-startapp-ads-module

0.0.10 • Public • Published

react-native-startapp-ads-module

Android supported

Usage

  yarn add react-native-startapp-ads-module

initialize first

  import StartappAds from "react-native-startapp-ads-module";
  StartappAds.initialize('app id', 'return ads);
  StartappAds.initialize('123456', true);

Interstitial

  import Interstitial from 'react-native-startapp-ads-module/Interstitial';
  
  - load 
  Interstitial.load();
  - addListener
  type = 'onReceiveAd' | 'onFailedToReceiveAd' | 'adDisplayed' | 'adNotDisplayed'| 'adHidden' | 'adClicked';
  Interstitial.addListener('onReceiveAd', () => {
    // show ad 
    Interstitial.show()
  })

Banner

   import BannerAd from 'react-native-startapp-ads-module/BannerAd';
   <BannerAd style={{height: 50}} />

BannerNative

   import BannerNative from 'react-native-startapp-ads-module/BannerNative';
     <BannerNative
        onReceiveAd={dataAds => {
          console.log(dataAds)
        }}
        onFailedToReceiveAd={() =>
          console.log('---- 👉🏼 onFailedToReceiveAd')
        }
      >
        <View>
           {custom banner native}
        </View>
      </BannerNative>

TODOS

  • [ ] supported IOS

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-startapp-ads-module

Weekly Downloads

2

Version

0.0.10

License

ISC

Unpacked Size

23.7 kB

Total Files

15

Last publish

Collaborators

  • nhjuhoang