Wiki

Clone wiki

REACT native plugin / AATKitUserEarnedIncentive

Overview

Notifies that placement has earned incentive (by rewarded ads).

Data passed by the event

data

JSON object containing information about incentive:

string. placementName - Unique name of the placement. The same name will be used in addapptr.com account.

object. reward - JSON object containing information about reward. Might not exists if network doesn't return information about reward.

  • string. name - name of the reward.
  • string. value - value of the reward.

Examples

#!javascript

import RNAatkit from '@addapptr/react-native-aatkit'
import { NativeEventEmitter, NativeModules } from 'react-native';
const aatkitEmitter = new NativeEventEmitter(RNAatkit);

const subscription = aatkitEmitter.addListener(
  'AATKitUserEarnedIncentive',
  (data) => console.log("AATKitUserEarnedIncentive placementName: " + data.placementName + " reward: " + data.reward)
);

Updated