Appodeal
Plugin to serve ads through native Appodeal SDKs
Repo: https://github.com/appodeal/appodeal-cordova-plugin
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add https://github.com/appodeal/appodeal-cordova-plugin.git $ npm install --save @ionic-native/appodeal@4 - Add this plugin to your app's module
Supported platforms
- iOS
- Android
Usage
import { Appodeal } from '@ionic-native/appodeal';
constructor(private appodeal: Appodeal) {
const appKey = '<your app key>';
appodeal.initialize(appKey, appodeal.AD_TYPES.REWARDED_VIDEO);
appodeal.show(appodeal.AD_TYPES.REWARDED_VIDEO);
}
Instance Members
readonly
initialize(appKey, adType)
initialize Appodeal SDK
| Param | Type | Details |
|---|---|---|
| appKey |
string
|
|
| adType |
number
|
isInitialized()
check if SDK has been initialized
Returns: Promise<boolean>
show(adType)
show ad of specified type
| Param | Type | Details |
|---|---|---|
| adType |
number
|
Returns: Promise<boolean>
showWithPlacement(adType, placement)
show ad of specified type with placement options
| Param | Type | Details |
|---|---|---|
| adType |
number
|
|
| placement |
any
|
Returns: Promise<boolean>
hide(adType)
hide ad of specified type
| Param | Type | Details |
|---|---|---|
| adType |
number
|
canShow(adType)
confirm use of ads of specified type
| Param | Type | Details |
|---|---|---|
| adType |
number
|
Returns: Promise<any>
isLoaded(adType)
check if ad of specified type has been loaded
| Param | Type | Details |
|---|---|---|
| adType |
number
|
Returns: Promise<boolean>
isPrecache(adType)
check if ad of specified
| Param | Type | Details |
|---|---|---|
| adType |
number
|
Returns: Promise<boolean>
setAutoCache(adType, autoCache)
| Param | Type | Details |
|---|---|---|
| adType |
number
|
|
| autoCache |
cache(adType)
forcefully cache an ad by type
| Param | Type | Details |
|---|---|---|
| adType |
number
|
setTriggerOnLoadedOnPrecache(set)
| Param | Type | Details |
|---|---|---|
| set |
boolean
|
setSmartBanners(enabled)
enable or disable Smart Banners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
setBannerBackground(enabled)
enable or disable banner backgrounds
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
setBannerAnimation(enabled)
enable or disable banner animations
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
set728x90Banners(value)
| Param | Type | Details |
|---|---|---|
| value |
setLogLevel(logging)
enable or disable logging
| Param | Type | Details |
|---|---|---|
| logging |
boolean
|
setTesting(testing)
enable or disable testing mode
| Param | Type | Details |
|---|---|---|
| testing |
boolean
|
resetUUID()
reset device ID
getVersion()
get version of Appdeal SDK
disableNetwork(network, adType)
| Param | Type | Details |
|---|---|---|
| network |
string
|
|
| adType |
number
|
disableNetworkType(network, adType)
| Param | Type | Details |
|---|---|---|
| network |
string
|
|
| adType |
number
|
disableLocationPermissionCheck()
disable Location permissions for Appodeal SDK
disableWriteExternalStoragePermissionCheck()
disable Storage permissions for Appodeal SDK
enableInterstitialCallbacks(enabled)
enable event listeners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
enableSkippableVideoCallbacks(enabled)
enable event listeners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
enableNonSkippableVideoCallbacks(enabled)
enable event listeners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
enableBannerCallbacks(enabled)
enable event listeners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
enableRewardedVideoCallbacks(enabled)
enable event listeners
| Param | Type | Details |
|---|---|---|
| enabled |
boolean
|
setCustomBooleanRule(name, value)
| Param | Type | Details |
|---|---|---|
| name |
string
|
name of rule |
| value |
boolean
|
setCustomIntegerRule(name, value)
| Param | Type | Details |
|---|---|---|
| name |
string
|
name of rule |
| value |
number
|
setCustomDoubleRule(name, value)
set rule with float value
| Param | Type | Details |
|---|---|---|
| name |
string
|
|
| value |
number
|
setCustomStringRule(name, value)
set rule with string value
| Param | Type | Details |
|---|---|---|
| name |
string
|
name of rule |
| value |
string
|
setUserId(id)
set ID preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| id |
setEmail(email)
set Email preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
setBirthday(birthday)
set Birthday preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| birthday |
setAge(age)
et Age preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| age |
setGender(gender)
set Gender preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| gender |
setOccupation(occupation)
set Occupation preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| occupation |
setRelation(relation)
set Relation preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| relation |
setSmoking(smoking)
set Smoking preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| smoking |
setAlcohol(alcohol)
set Alcohol preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| alcohol |
setInterests(interests)
set Interests preference in Appodeal for current user
| Param | Type | Details |
|---|---|---|
| interests |
onInterstitialLoaded()
onInterstitialFailedToLoad()
onInterstitialShown()
onInterstitialClicked()
onInterstitialClosed()
onSkippableVideoLoaded()
onSkippableVideoFailedToLoad()
onSkippableVideoShown()
onSkippableVideoFinished()
onSkippableVideoClosed()
onRewardedVideoLoaded()
onRewardedVideoFailedToLoad()
onRewardedVideoShown()
onRewardedVideoFinished()
onRewardedVideoClosed()
onNonSkippableVideoLoaded()
onNonSkippableVideoFailedToLoad()
onNonSkippableVideoShown()
onNonSkippableVideoFinished()
onNonSkippableVideoClosed()
onBannerClicked()
onBannerFailedToLoad()
onBannerLoaded()
onBannerShown()
getRewardParametersForPlacement()
getRewardParameters()
canShowWithPlacement()
showTestScreen()
Platforms:Android