项目作者: khalisafkari

项目描述 :
Smaato Ads for React Native
高级语言: Java
项目地址: git://github.com/khalisafkari/react-native-smaato-ad.git
创建时间: 2019-12-13T18:21:51Z
项目社区:https://github.com/khalisafkari/react-native-smaato-ad

开源协议:MIT License

下载


react-native-smaato-ad

Facebook Ads

Monetize Your App With the Smaato Publisher Platform
Maximize your mobile advertising fill rates and eCPMs.

npm version

Platforms Supported

  • Android

Note: Why isn’t the iOS version available? because i don’t have mac os

Getting Started

Here’s how to get started quickly with the React Native Smaato Next Ads.

1. Add react-native-smaato-ad to your dependencies

  1. $ yarn add react-native-smaato-ad

(or)

For npm use

  1. $ npm install --save react-native-smaato-ad

From react-native 0.60 autolinking will take care of the link.

React Native modules that include nativeJava, or Kotlin code have to be “linked” so that the compiler knows to include them in the app.

  1. $ react-native link react-native-smaato-ad

Android -
Please make sure AndroidX is enabled in your project by editting android/gradle.properties and adding 2 lines:

  1. android.useAndroidX=true
  2. android.enableJetifier=true
  1. # /android/app/build.gradle
  2. implementation 'com.smaato.android.sdk:smaato-sdk:21.5.2'
  3. implementation 'com.smaato.android.sdk:smaato-sdk-banner:21.5.2'
  4. implementation 'com.smaato.android.sdk:smaato-sdk-interstitial:21.5.2'
  5. implementation 'com.smaato.android.sdk:smaato-sdk-rewarded-ads:21.5.2'
  1. # /android/build.gradle
  2. allprojects {
  3. repositories {
  4. ...
  5. maven {
  6. url "https://s3.amazonaws.com/smaato-sdk-releases/"
  7. }
  8. ...
  9. }
  10. }
  1. // index.js
  2. import SmaatoAd from 'react-native-smaato-ad'
  3. SmaatoAd.init('<YOUR ID PUBLISHER>')

3. api docs

Common issues

License

MIT