Skip to content

GreedyGame is an end-to-end implementation, mediation and optimization platform for Ads, support Admob, FacebookAds, Mopub,

License

Notifications You must be signed in to change notification settings

khalisafkari/react-native-sdkx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d2aebb · Nov 2, 2020

History

22 Commits
Oct 23, 2020
Nov 2, 2020
Nov 2, 2020
Oct 23, 2020
Oct 29, 2020
Oct 23, 2020
Oct 23, 2020
Oct 29, 2020
Oct 23, 2020
Oct 23, 2020
Oct 29, 2020
Oct 23, 2020
Nov 2, 2020
Oct 23, 2020
Oct 23, 2020
Oct 29, 2020

Repository files navigation

react-native-sdkx

Untitled-presentation

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

Screenshot-1603528544 Screenshot-1603528555

// 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 to learn how to contribute to the repository and the development workflow.

License

MIT