A Ionic Capacitor plugin for integrate ValueImpressionSDK.
npm install capacitor-plugin-bilmobileads
npx cap sync
Add new property to Info.plist
Key: GADIsAdManagerApp Type: Boolean Type: YES
1. Add the JitPack repository to your build file:
- In your root build.gradle (app folder) at the end of repositories and add maven { url 'https://jitpack.io' }.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2. Add BilMobileAds.class to MainActivity.java:
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
add(BilMobileAds.class);
}});
}
}
import { PluginListenerHandle, Plugins } from '@capacitor/core';
const { BilMobileAds } = Plugins
constructor(){
// Must initialize before create ads
BilMobileAds.initialize({ testMode: false });
}
addListener(...)
initialize(...)
enableCOPPA()
disableCOPPA()
setYearOfBirth(...)
setGender(...)
createBanner(...)
loadBanner()
showBanner()
hideBanner()
destroyBanner()
setPositionBanner(...)
getSafeArea()
createInterstitial(...)
preLoadInterstitial()
showInterstitial()
destroyInterstitial()
isReadyInterstitial()
createRewarded(...)
preLoadRewarded()
showRewarded()
destroyRewarded()
isReadyRewarded()
- Interfaces
- Enums
addListener(eventName: 'BilmobileAdsPluginEvent', listenerFunc: AdEventListener) => PluginListenerHandle
Param | Type |
---|---|
eventName |
"BilmobileAdsPluginEvent" |
listenerFunc |
(status: AdEvents) => void |
Returns: PluginListenerHandle
initialize(option: { testMode: boolean; }) => void
Param | Type |
---|---|
option |
{ testMode: boolean; } |
enableCOPPA() => void
disableCOPPA() => void
setYearOfBirth(option: { yearOfBirth: number; }) => void
Param | Type |
---|---|
option |
{ yearOfBirth: number; } |
setGender(option: { gender: BilGender; }) => void
Param | Type |
---|---|
option |
{ gender: BilGender; } |
createBanner(option: { adUnitId: string; position: AdPosition; }) => any
Param | Type |
---|---|
option |
{ adUnitId: string; position: AdPosition; } |
Returns: any
loadBanner() => any
Returns: any
showBanner() => any
Returns: any
hideBanner() => any
Returns: any
destroyBanner() => any
Returns: any
setPositionBanner(option: { position: AdPosition; }) => any
Param | Type |
---|---|
option |
{ position: AdPosition; } |
Returns: any
getSafeArea() => any
Returns: any
createInterstitial(option: { adUnitId: string; }) => any
Param | Type |
---|---|
option |
{ adUnitId: string; } |
Returns: any
preLoadInterstitial() => any
Returns: any
showInterstitial() => any
Returns: any
destroyInterstitial() => any
Returns: any
isReadyInterstitial() => any
Returns: any
createRewarded(option: { adUnitId: string; }) => any
Param | Type |
---|---|
option |
{ adUnitId: string; } |
Returns: any
preLoadRewarded() => any
Returns: any
showRewarded() => any
Returns: any
destroyRewarded() => any
Returns: any
isReadyRewarded() => any
Returns: any
Prop | Type |
---|---|
remove |
() => void |
Prop | Type |
---|---|
topPadding |
number |
bottomPadding |
number |
Members |
---|
Unknown |
Male |
Female |
Members |
---|
TopCenter |
TopLeft |
TopRight |
BottomCenter |
BottomLeft |
BottomRight |
Center |