0.1.8 • Published 4 years ago

react-native-sdkx v0.1.8

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

react-native-sdkx

GreedyGame’s SDK X is an SDK for app developers to increase their monetisation capabilities. You can also connect your AdMob account and mediate ads to optimise your AdMob Monetization.

installed

npm install react-native-sdkx

or

yarn add react-native-sdkx

Usage

// in-initialize
interface option {
  appId: string; // required
  themes?: number; // default 0 choose 1 | 0
  enableCoppa?: boolean; // optional default true
  enableCcpa?: boolean; // optional default true
  enableGdpr?: boolean; // optional default true
  enableDebug?: boolean; // optional default true
}

interface props  {
  initialize(option): Promise<boolean>;
  isinitialize(): Promise<boolean>;
  loadAdIntertitial(unitAd: string): Promise<boolean>;
  showIntertitialAd(): void;
  destroy(): void;
  prefetchAds(unitAd: string, callback: Function): void;
};
  // index.js

  import SDK from 'react-native-sdkx';

  export interface option {
    appId: string;
    themes?: number;
    enableCoppa?: boolean;
    enableCcpa?: boolean;
    enableGdpr?: boolean;
    enableDebug?: boolean;
  }

  SDK.initialize(option)
// intertitial Ad
import SDKX from 'react-native-sdkx';

const loadAd = await SDKX.loadAdIntertitial('unit ad')
if (loadAd)  { SDKX.showIntertitialAd() }
//Banner
import SDKX, { BannerAd } from 'react-native-sdkx';

interface props {
  style?: StyleProp<ViewStyle>;
  adUnit?: string; // bannerId | nativeId
  onReadyForRefresh?: Function;
  onUiiClosed?: Function;
  onUiiOpened?: Function;
  onAdLoadFailed?(error?: string): Function;
  onAdLoaded?: Function;
}

<BannerAd adUnit={'AdId'} style={{ height: 100, width: '100%' }} />
To beautify the native appearance -
I suggest a minimum height style of 250

Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

License

MIT

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago