Skip to content

nhjuhoang/react-native-startapp-ads-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published