Package | com.myflashlab.air.extensions.admob |
Class | public class AdMob |
Inheritance | AdMob Object |
Property | Defined By | ||
---|---|---|---|
api : AdMobApi [static] [read-only]
Access to the Admob API
| AdMob |
Method | Defined By | ||
---|---|---|---|
dispose():void [static]
Call this method if you wish to dispose all current Ad types. | AdMob | ||
[static]
This is the first method you should call when using the Admob ANE. | AdMob |
Constant | Defined By | ||
---|---|---|---|
AD_TYPE_BANNER : String = banner [static] | AdMob | ||
AD_TYPE_INTERSTITIAL : String = interstitial [static] | AdMob | ||
AD_TYPE_REWARDED_VIDEO : String = rewardedVideo [static] | AdMob | ||
ANDROID_SDK_VERSION : String = 18.3.0 [static] | AdMob | ||
ERROR_CODE_INTERNAL_ERROR : int = 0 [static] Something happened internally; for instance, an invalid response was received from the ad server. | AdMob | ||
ERROR_CODE_INVALID_REQUEST : int = 1 [static] The ad request was invalid; for instance, the ad unit ID was incorrect. | AdMob | ||
ERROR_CODE_NETWORK_ERROR : int = 2 [static] The ad request was unsuccessful due to network connectivity. | AdMob | ||
ERROR_CODE_NO_FILL : int = 3 [static] The ad request was successful, but no ad was returned due to lack of ad inventory. | AdMob | ||
EXTENSION_ID : String = com.myflashlab.air.extensions.admob [static] | AdMob | ||
IOS_SDK_VERSION : String = 7.55.1 [static] | AdMob | ||
VERSION : String = 5.10.0 [static] | AdMob |
api | property |
api:AdMobApi
[read-only] Access to the Admob API
public static function get api():AdMobApi
dispose | () | method |
public static function dispose():void
Call this method if you wish to dispose all current Ad types. Alternatively you can call each Ad type's dispose method to speceficly dispose it.
See also
init | () | method |
public static function init($stage:Stage, $applicationCode:String = null):AdMob
This is the first method you should call when using the Admob ANE. You only need to call this method only once.
IMPORTANT: When initializing the ANE, you are required to pass in the
flash.display.Stage
into the ANE, but you should be careful when you are doing this. When your
app starts on iOS platform, the AIR Stage will need a couple of seconds before it can reach its final
dimension. So if you are initializing the ANE too soon on iOS, it's very probable that you can't correctly
control the x, y position of banner ads. All you have to do is to wait a few seconds from the launch time
of your app and then initialize the Admob ANE.
Parameters
$stage:Stage — flash.display.Stage of your AIR project
| |
$applicationCode:String (default = null ) — pass null to use the DoubleClick API but if you want to use the Admob API, you
must copy your Admob application code here. When you create a new app in your Admob console
https://apps.admob.com you will receive an App ID String which is something like this:
ca-app-pub-9202431023205722~4891265119 . You should copy that String here.
|
AdMob — |
AD_TYPE_BANNER | Constant |
public static const AD_TYPE_BANNER:String = banner
AD_TYPE_INTERSTITIAL | Constant |
public static const AD_TYPE_INTERSTITIAL:String = interstitial
AD_TYPE_REWARDED_VIDEO | Constant |
public static const AD_TYPE_REWARDED_VIDEO:String = rewardedVideo
ANDROID_SDK_VERSION | Constant |
public static const ANDROID_SDK_VERSION:String = 18.3.0
ERROR_CODE_INTERNAL_ERROR | Constant |
public static const ERROR_CODE_INTERNAL_ERROR:int = 0
Something happened internally; for instance, an invalid response was received from the ad server.
ERROR_CODE_INVALID_REQUEST | Constant |
public static const ERROR_CODE_INVALID_REQUEST:int = 1
The ad request was invalid; for instance, the ad unit ID was incorrect.
ERROR_CODE_NETWORK_ERROR | Constant |
public static const ERROR_CODE_NETWORK_ERROR:int = 2
The ad request was unsuccessful due to network connectivity.
ERROR_CODE_NO_FILL | Constant |
public static const ERROR_CODE_NO_FILL:int = 3
The ad request was successful, but no ad was returned due to lack of ad inventory.
EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.admob
IOS_SDK_VERSION | Constant |
public static const IOS_SDK_VERSION:String = 7.55.1
VERSION | Constant |
public static const VERSION:String = 5.10.0