Package | com.distriqt.extension.adverts |
Class | public class Adverts |
Inheritance | Adverts flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
appOpenAds : AppOpenAds [read-only]
Access to the App Open Ads functionality
| Adverts | ||
consent : Consent [read-only]
Access to the user consent functionality. | Adverts | ||
implementation : String [read-only]
The implementation currently in use. | Adverts | ||
interstitials : Interstitials [read-only]
Returns access to the interstitial functionality. | Adverts | ||
isSupported : Boolean [static] [read-only]
Whether the current device supports the extensions functionality
| Adverts | ||
nativeAds : NativeAds [read-only]
Access to the native ads functionality
| Adverts | ||
nativeVersion : String [read-only]
The native version string of the native extension. | Adverts | ||
platformVersion : String [read-only]
Returns the current version of the platform SDK. | Adverts | ||
rewardedInterstitialAds : RewardedInterstitialAds [read-only]
Access to the rewarded video ad functionality. | Adverts | ||
rewardedVideoAds : RewardedVideoAds [read-only]
Access to the rewarded video ad functionality. | Adverts | ||
service : Adverts [static] [read-only]
The singleton instance of the Extension class. | Adverts | ||
ump : UserMessagingPlatform [read-only]
Access to the user messaging platform functionality for user consent and authorisation requests. | Adverts | ||
userMessagingPlatform : UserMessagingPlatform [read-only]
Access to the user messaging platform functionality for user consent and authorisation requests. | Adverts | ||
version : String [read-only]
The version of this extension. | Adverts |
Method | Defined By | ||
---|---|---|---|
Adverts()
Constructor
You should not call this directly, but instead use the singleton access
| Adverts | ||
createAdView(created:Function):void
Creates an AdView to display banner adverts in your application. | Adverts | ||
dispose():void
Disposes the extension and releases any allocated resources. | Adverts | ||
getAdvertisingId(callback:Function = null):String Deprecated: Use the IDFA extension to retrieve the advertising identifier and request authorisation
Retrieves the advertising id for the current advertising platform
This function will return the current known value, however the id may not yet be valid. | Adverts | ||
Gets the global RequestConfiguration object. | Adverts | ||
init(key:String):void Deprecated: You no longer need to use an application key [static]
Initialises the extension class for use with the provided key. | Adverts | ||
initialise():void
Initialises the service and starts any data collection. | Adverts | ||
initialisePlatform(platform:String, accountId:String):void Deprecated: You should now use setup followed by initialise
Initialise the required platform with your account ID for the service. | Adverts | ||
isPlatformSupported(platform:String):Boolean
Using this function you can determine if a platform is supported on the
current device. | Adverts | ||
setAppMuted(muted:Boolean):void
To inform the SDK that the app volume has been muted
| Adverts | ||
setAppVolume(volume:Number):void
Set the app volume for the adverts
If your app has its own volume controls (such as custom music or sound effect volumes),
disclosing app volume to the Adverts extension allows video ads to respect app volume
settings. | Adverts | ||
setRequestConfiguration(config:RequestConfiguration):void
Sets the global RequestConfiguration that will be used for every AdRequest during the app's session. | Adverts | ||
setup(platform:String, accountId:String):void
Setup the required service with your account ID for the service. | Adverts | ||
uniqueId(type:String):String Deprecated: Please Use getAdvertisingId()
Retrieves a unique device ID from the underlying platform. | Adverts |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the advertising id has been retrieved The identifier will be in event.info.advertisingId | Adverts |
Constant | Defined By | ||
---|---|---|---|
ADVERTISING : String = advertising Deprecated: Deprecated [static]
Android
The ADVERTISING options returns the
Google Play Advertising ID. | Adverts | ||
EXT_CONTEXT_ID : String = com.distriqt.Adverts [static] | Adverts | ||
VENDOR : String = vendor Deprecated: Deprecated [static]
Android
On Android this is the value of the ANDROID_ID. | Adverts | ||
VERSION : String = 15.1.0 [static] | Adverts |
appOpenAds | property |
appOpenAds:AppOpenAds
[read-only] Access to the App Open Ads functionality
public function get appOpenAds():AppOpenAds
consent | property |
consent:Consent
[read-only] Access to the user consent functionality.
public function get consent():Consent
implementation | property |
implementation:String
[read-only]
The implementation currently in use. This should be one of the following depending on the platform in use and the functionality supported by this extension:
Android
iOS
default
unknown
public function get implementation():String
interstitials | property |
interstitials:Interstitials
[read-only]
Returns access to the interstitial functionality.
public function get interstitials():Interstitials
isSupported | property |
isSupported:Boolean
[read-only] Whether the current device supports the extensions functionality
public static function get isSupported():Boolean
nativeAds | property |
nativeAds:NativeAds
[read-only] Access to the native ads functionality
public function get nativeAds():NativeAds
nativeVersion | property |
nativeVersion:String
[read-only]
The native version string of the native extension.
public function get nativeVersion():String
platformVersion | property |
platformVersion:String
[read-only]
Returns the current version of the platform SDK.
If initialise
has not yet been called this may return a null or empty string.
public function get platformVersion():String
rewardedInterstitialAds | property |
rewardedInterstitialAds:RewardedInterstitialAds
[read-only] Access to the rewarded video ad functionality.
public function get rewardedInterstitialAds():RewardedInterstitialAds
rewardedVideoAds | property |
rewardedVideoAds:RewardedVideoAds
[read-only] Access to the rewarded video ad functionality.
public function get rewardedVideoAds():RewardedVideoAds
service | property |
service:Adverts
[read-only] The singleton instance of the Extension class.
public static function get service():Adverts
ump | property |
ump:UserMessagingPlatform
[read-only] Access to the user messaging platform functionality for user consent and authorisation requests.
public function get ump():UserMessagingPlatform
userMessagingPlatform | property |
userMessagingPlatform:UserMessagingPlatform
[read-only] Access to the user messaging platform functionality for user consent and authorisation requests.
public function get userMessagingPlatform():UserMessagingPlatform
version | property |
version:String
[read-only]
The version of this extension.
This should be of the format, MAJOR.MINOR.BUILD
public function get version():String
Adverts | () | Constructor |
public function Adverts()
Constructor You should not call this directly, but instead use the singleton access
createAdView | () | method |
public function createAdView(created:Function):void
Creates an AdView to display banner adverts in your application.
Parameters
created:Function — Callback function returning the newly created AdView instance. Should be of the form: function ( adView:AdView ):void
|
dispose | () | method |
public function dispose():void
Disposes the extension and releases any allocated resources. Once this function
has been called, a call to init
is necessary again before any of the
extensions functionality will work.
getAdvertisingId | () | method |
public function getAdvertisingId(callback:Function = null):String
Retrieves the advertising id for the current advertising platform
This function will return the current known value, however the id may not yet be valid.
You should instead listen for the AdvertisingIdEvent.ADVERTISING_ID
event and use
the value contained in the event.
When the AdvertisingIdEvent.ADVERTISING_ID
event is received it also contains
information about the ad limited tracking setting on the device.
As an alternative to the event you can pass a single callback function to the function
which will get called with a single parameter being an instance of the AdvertisingIdInfo
class containing the identifier information.
Note You must call initialise the advert platform using initialisePlatform
before attempting to call this function.
Parameters
callback:Function (default = null ) — A single alternative callback function called on completion of the advertising id retrieval
|
String — The current stored value of the advertising id or "" if there is no identifier yet.
|
See also
getRequestConfiguration | () | method |
public function getRequestConfiguration():RequestConfiguration
Gets the global RequestConfiguration object.
ReturnsRequestConfiguration — Global RequestConfiguration
|
init | () | method |
public static function init(key:String):void
Initialises the extension class for use with the provided key.
Parameters
key:String |
initialise | () | method |
public function initialise():void
Initialises the service and starts any data collection.
Must be called after setup
.
initialisePlatform | () | method |
public function initialisePlatform(platform:String, accountId:String):void
Initialise the required platform with your account ID for the service.
This function performs all the setup and initialisation of the requested
platform and passes any account information required to the service.
This is now deprecated and is broken into to two functions: setup
and initialise
This was done so to separate the selection of a service and initialisation of the service, so you
can access consent functionality before initialising the service.
Parameters
platform:String — The AdvertPlatform value for the required advertising platform
| |
accountId:String — Account ID for the specified platform (if required)
|
See also
isPlatformSupported | () | method |
public function isPlatformSupported(platform:String):Boolean
Using this function you can determine if a platform is supported on the current device.
This is useful in situations where you wish to use platforms based on the availability. Eg use iAd when available but fallback to admob in other cases, such as on Android devices.
Parameters
platform:String — The platform identifier of the advertising platform of interest
|
Boolean — true if the specified platform is supported on the current device
|
See also
setAppMuted | () | method |
public function setAppMuted(muted:Boolean):void
To inform the SDK that the app volume has been muted
Parameters
muted:Boolean — true if the app volume has been muted, false if not.
|
setAppVolume | () | method |
public function setAppVolume(volume:Number):void
Set the app volume for the adverts If your app has its own volume controls (such as custom music or sound effect volumes), disclosing app volume to the Adverts extension allows video ads to respect app volume settings. This ensures users receive video ads with the expected audio volume. Valid ad volume values range from 0.0 (silent) to 1.0 (current device volume).
Parameters
volume:Number — The specified app volume
|
setRequestConfiguration | () | method |
public function setRequestConfiguration(config:RequestConfiguration):void
Sets the global RequestConfiguration that will be used for every AdRequest during the app's session.
Parameters
config:RequestConfiguration — The new request configuration
|
setup | () | method |
public function setup(platform:String, accountId:String):void
Setup the required service with your account ID for the service. This function performs all the setup of the requested service and passes any account information required to the service however it does not initialise the service. This allows you to setup the service and access consent functionality in order to correctly gather consent before initialising the service and starting any access of user information.
Parameters
platform:String — The AdvertPlatform value for the required advertising platform
| |
accountId:String — Account ID for the specified platform (if required)
|
See also
uniqueId | () | method |
public function uniqueId(type:String):String
Retrieves a unique device ID from the underlying platform. Generally this is a sanctioned ID however you should consult the particular platform documentation regarding the usage of the ID.
The default operation of this function is to retrieve an ID that you can use in your application to identify a user's device.
Note You must call initialise before attempting to call this function.
Parameters
type:String (default = NaN ) — Ignored
|
String — A string with the requested unique device id
or "" if initialisePlatform hasn't
been called successfully.
|
See also
advert:advertisingid | Event |
com.distriqt.extension.adverts.events.AdvertisingIdEvent
com.distriqt.extension.adverts.events.AdvertisingIdEvent.ADVERTISING_ID
Dispatched when the advertising id has been retrieved
The identifier will be in event.info.advertisingId
ADVERTISING | Constant |
public static const ADVERTISING:String = advertising
Android
The ADVERTISING options returns the Google Play Advertising ID.
The advertising ID is a user-specific, unique, resettable ID for advertising, provided by Google Play services. It gives users better controls and provides developers with a simple, standard system to continue to monetize your apps. It is an anonymous identifier for advertising purposes and enables users to reset their identifier or opt out of interest-based ads within Google Play apps.
iOSOn iOS this is the value of the ASIdentifierManager advertisingIdentifier property. An alphanumeric string unique to each device, used only for serving advertisements.
Unlike the identifierForVendor property of the UIDevice, the same value is returned to all vendors. This identifier may change—for example, if the user erases the device—so you should not cache it.
The value of this property may be nil if the app is running in the background, before the user has unlocked the device the first time after the device has been restarted. If the value is nil, wait and get the value again later.
Note: This value is not supported in the iAd only version to avoid
review rejection based on this error:
iAd is not an appropriate use of Advertising Identifier. It looks as if the ads appearing are iAds.
EXT_CONTEXT_ID | Constant |
public static const EXT_CONTEXT_ID:String = com.distriqt.Adverts
VENDOR | Constant |
public static const VENDOR:String = vendor
Android
On Android this is the value of the ANDROID_ID.
iOSOn iOS this is the value of the UIDevice identifierForVendor property.
The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.
The value of this property may be nil if the app is running in the background, before the user has unlocked the device the first time after the device has been restarted. If the value is nil, wait and get the value again later.
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
VERSION | Constant |
public static const VERSION:String = 15.1.0