react-native-sdkx for greedygames
npm install 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.
shell script
npm install react-native-sdkxor
yarn add react-native-sdkx
`
$3
`typescript jsx// 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;
isinitialize(): Promise;
loadAdIntertitial(unitAd: string): Promise;
showIntertitialAd(): void;
destroy(): void;
prefetchAds(unitAd: string, callback: Function): void;
};
`
`typescript jsx
// 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)
``typescript// intertitial Ad
import SDKX from 'react-native-sdkx';
const loadAd = await SDKX.loadAdIntertitial('unit ad')
if (loadAd) { SDKX.showIntertitialAd() }
``typescript jsx
//Banner
import SDKX, { BannerAd } from 'react-native-sdkx';interface props {
style?: StyleProp;
adUnit?: string; // bannerId | nativeId
onReadyForRefresh?: Function;
onUiiClosed?: Function;
onUiiOpened?: Function;
onAdLoadFailed?(error?: string): Function;
onAdLoaded?: Function;
}
``
To beautify the native appearance -
I suggest a minimum height style of 250``See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT