Packagecom.myflashlab.air.extensions.admob
Classpublic class AdRequest
InheritanceAdRequest Inheritance Object

Data object representing the ad request you want to submit to the Admob servers. Every time you need to load a new Ad, you have to submit a request to the loadAd method of that Ad type.

See also

com.myflashlab.air.extensions.admob.ApiBannerAds.loadAd()
com.myflashlab.air.extensions.admob.ApiInterstitialAds.loadAd()
com.myflashlab.air.extensions.admob.ApiRewardedVideo.loadAd()


Public Properties
 PropertyDefined By
  contentUrl : String
Sets the content URL for targeting purposes.
AdRequest
  extras : Object
AdRequest
  keywords : Array
Add an array of keywords for targeting purposes.
AdRequest
  location : Point
Sets the user's location for targeting purposes.
AdRequest
  maxAdContentRating : String
Set a maximum ad content rating.
AdRequest
  requestAgent : String
Sets the request agent string to identify the ad request's origin.
AdRequest
  tagForChildDirectedTreatment : Boolean
This method allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.
AdRequest
  tagForUnderAgeOfConsent : int
This method allows you to mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent.
AdRequest
  testDevices : Array
An array of test devices, causes a device to receive test ads.
AdRequest
Public Methods
 MethodDefined By
  
Initialize a new AdRequest object each time you would like to load a new Ad and optionally set the parameters to customize the Ad content you would receive in your app.
AdRequest
Public Constants
 ConstantDefined By
  MAX_AD_CONTENT_RATING_G : String = G
[static] Content suitable for general audiences, including families.
AdRequest
  MAX_AD_CONTENT_RATING_MA : String = MA
[static] Content suitable only for mature audiences.
AdRequest
  MAX_AD_CONTENT_RATING_PG : String = PG
[static] Content suitable for most audiences with parental guidance.
AdRequest
  MAX_AD_CONTENT_RATING_T : String = T
[static] Content suitable for teen and older audiences.
AdRequest
  TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE : int = 0
[static] Indicates the publisher specified that the ad request should not receive treatment for users in the European Economic Area (EEA) under the age of consent.
AdRequest
  TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE : int = 1
[static] Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.
AdRequest
  TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED : int = -1
[static] Indicates that the publisher has not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.
AdRequest
Property Detail
contentUrlproperty
contentUrl:String

Sets the content URL for targeting purposes.


Implementation
    public function get contentUrl():String
    public function set contentUrl(value:String):void
extrasproperty 
extras:Object


Implementation
    public function get extras():Object
    public function set extras(value:Object):void
keywordsproperty 
keywords:Array

Add an array of keywords for targeting purposes.


Implementation
    public function get keywords():Array
    public function set keywords(value:Array):void
locationproperty 
location:Point

Sets the user's location for targeting purposes. You should pass in the Latitude, longitude positions as a flash.geom.Point object where latitude is the x parameter and longitude is the y parameter.


Implementation
    public function get location():Point
    public function set location(value:Point):void
maxAdContentRatingproperty 
maxAdContentRating:String

Set a maximum ad content rating. AdMob ads returned for these requests have a content rating at or below that level. Valid values are:


Implementation
    public function get maxAdContentRating():String
    public function set maxAdContentRating(value:String):void
requestAgentproperty 
requestAgent:String

Sets the request agent string to identify the ad request's origin.


Implementation
    public function get requestAgent():String
    public function set requestAgent(value:String):void
tagForChildDirectedTreatmentproperty 
tagForChildDirectedTreatment:Boolean

This method allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.


Implementation
    public function get tagForChildDirectedTreatment():Boolean
    public function set tagForChildDirectedTreatment(value:Boolean):void
tagForUnderAgeOfConsentproperty 
tagForUnderAgeOfConsent:int

This method allows you to mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR). Note that you may have other legal obligations under GDPR. Please review the European Union's guidance and consult with your own legal counsel. Please remember that Google's tools are designed to facilitate compliance and do not relieve any particular publisher of its obligations under the law.

When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in the ad request. This parameter disables personalized advertising, including remarketing, for that specific ad request. It also disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers.

If you set this method to TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE, you will indicate that you want the ad request to be handled in a manner suitable for users under the age of consent.

If you set this method to TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE, you will indicate that you don't want the ad request to be handled in a manner suitable for users under the age of consent.

If you do not set this method, or set this method to TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED, ad requests will include no indication of how you would like your app to be handled in a manner suitable for users under the age of consent.


Implementation
    public function get tagForUnderAgeOfConsent():int
    public function set tagForUnderAgeOfConsent(value:int):void
testDevicesproperty 
testDevices:Array

An array of test devices, causes a device to receive test ads.


Implementation
    public function get testDevices():Array
    public function set testDevices(value:Array):void
Constructor Detail
AdRequest()Constructor
public function AdRequest()

Initialize a new AdRequest object each time you would like to load a new Ad and optionally set the parameters to customize the Ad content you would receive in your app.

Constant Detail
MAX_AD_CONTENT_RATING_GConstant
public static const MAX_AD_CONTENT_RATING_G:String = G

Content suitable for general audiences, including families.

MAX_AD_CONTENT_RATING_MAConstant 
public static const MAX_AD_CONTENT_RATING_MA:String = MA

Content suitable only for mature audiences.

MAX_AD_CONTENT_RATING_PGConstant 
public static const MAX_AD_CONTENT_RATING_PG:String = PG

Content suitable for most audiences with parental guidance.

MAX_AD_CONTENT_RATING_TConstant 
public static const MAX_AD_CONTENT_RATING_T:String = T

Content suitable for teen and older audiences.

TAG_FOR_UNDER_AGE_OF_CONSENT_FALSEConstant 
public static const TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE:int = 0

Indicates the publisher specified that the ad request should not receive treatment for users in the European Economic Area (EEA) under the age of consent.

TAG_FOR_UNDER_AGE_OF_CONSENT_TRUEConstant 
public static const TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE:int = 1

Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIEDConstant 
public static const TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED:int = -1

Indicates that the publisher has not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.