capacitor-plugin-bilmobileads
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

capacitor-plugin-bilmobileads

A Ionic Capacitor plugin for integrate ValueImpressionSDK.

Install

npm install capacitor-plugin-bilmobileads
npx cap sync

IOS

Add new property to Info.plist
Key: GADIsAdManagerApp Type: Boolean Type: YES

ANDROID

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 TO USE

import { PluginListenerHandle, Plugins } from '@capacitor/core';
const { BilMobileAds } = Plugins

constructor(){
    // Must initialize before create ads
    BilMobileAds.initialize({ testMode: false });
}

API

addListener(...)

addListener(eventName: 'BilmobileAdsPluginEvent', listenerFunc: AdEventListener) => PluginListenerHandle
Param Type
eventName "BilmobileAdsPluginEvent"
listenerFunc (status: AdEvents) => void

Returns: PluginListenerHandle


initialize(...)

initialize(option: { testMode: boolean; }) => void
Param Type
option { testMode: boolean; }

enableCOPPA()

enableCOPPA() => void

disableCOPPA()

disableCOPPA() => void

setYearOfBirth(...)

setYearOfBirth(option: { yearOfBirth: number; }) => void
Param Type
option { yearOfBirth: number; }

setGender(...)

setGender(option: { gender: BilGender; }) => void
Param Type
option { gender: BilGender; }

createBanner(...)

createBanner(option: { adUnitId: string; position: AdPosition; }) => any
Param Type
option { adUnitId: string; position: AdPosition; }

Returns: any


loadBanner()

loadBanner() => any

Returns: any


showBanner()

showBanner() => any

Returns: any


hideBanner()

hideBanner() => any

Returns: any


destroyBanner()

destroyBanner() => any

Returns: any


setPositionBanner(...)

setPositionBanner(option: { position: AdPosition; }) => any
Param Type
option { position: AdPosition; }

Returns: any


getSafeArea()

getSafeArea() => any

Returns: any


createInterstitial(...)

createInterstitial(option: { adUnitId: string; }) => any
Param Type
option { adUnitId: string; }

Returns: any


preLoadInterstitial()

preLoadInterstitial() => any

Returns: any


showInterstitial()

showInterstitial() => any

Returns: any


destroyInterstitial()

destroyInterstitial() => any

Returns: any


isReadyInterstitial()

isReadyInterstitial() => any

Returns: any


createRewarded(...)

createRewarded(option: { adUnitId: string; }) => any
Param Type
option { adUnitId: string; }

Returns: any


preLoadRewarded()

preLoadRewarded() => any

Returns: any


showRewarded()

showRewarded() => any

Returns: any


destroyRewarded()

destroyRewarded() => any

Returns: any


isReadyRewarded()

isReadyRewarded() => any

Returns: any


Interfaces

PluginListenerHandle

Prop Type
remove () => void

SafeArea

Prop Type
topPadding number
bottomPadding number

Enums

BilGender

Members
Unknown
Male
Female

AdPosition

Members
TopCenter
TopLeft
TopRight
BottomCenter
BottomLeft
BottomRight
Center

Readme

Keywords

Package Sidebar

Install

npm i capacitor-plugin-bilmobileads

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

329 kB

Total Files

87

Last publish

Collaborators

  • valueimpression