<AdPopcornBanner
appKey="663451319"
placementId="BANNER_320x50"
adSize="320x50"
refreshTime={15}
networkScheduleTimeout={20}
bannerAnimType="FADE_IN"
autoBgColor={false}
onBannerAdReceiveSuccess={(event) => { console.log('app.tx onBannerAdReceiveSuccess : ' + event.placementId) }}
onBannerAdReceiveFailed={(event) => { console.log('app.tx onBannerAdReceiveFailed : ' + event.placementId) }}
onBannerAdClicked={(event) => { console.log('app.tx onBannerAdClicked : ' + event.placementId) }}
/>
import React, { useEffect } from 'react';
import {
NativeModules,
NativeEventEmitter
} from 'react-native';
import AdPopcornBanner from './src/ads/adpopcornssp/AdPopcornBanner';
function App(): JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
RNAdPopcornSSPModule.init('your app key');
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<AdPopcornBanner
appKey="663451319"
placementId="BANNER_320x50"
adSize="320x50"
refreshTime={15}
networkScheduleTimeout={20}
bannerAnimType="FADE_IN"
autoBgColor={false}
onBannerAdReceiveSuccess={(event) => { console.log('app.tx onBannerAdReceiveSuccess : ' + event.placementId) }}
onBannerAdReceiveFailed={(event) => { console.log('app.tx onBannerAdReceiveFailed : ' + event.placementId) }}
onBannerAdClicked={(event) => { console.log('app.tx onBannerAdClicked : ' + event.placementId) }}
/>
</ScrollView>
</SafeAreaView>
);
}
배너에서 지원하는 property는 다음과 같습니다.