Admob for Flash ANE GMA21 Android and IOS "adobe air native extension"
- Admob ANE Description
- Admob ANE For Air Features
- Quick Start
1.import Admob ANE
2.Add New AppOpen Ads in your adobe Air App
3.Get Banner Size
4.Add New Anchored adaptive banner in your adobe Air App
5.Remove Banner
6.Load and Show Interstitial Ads
7.Admob Rewarded Video Ads
8.Admob Rewarded Video Events FullScreenContentCallback
9.Child-directed setting (COPPA) (GDPR) (EEA)
10.Add test Device
11.Android permission config
12.IOS permission config
13.ANE ID - Version
1.SDK version
2.Update Date - Links
- License
this is a New 2024 Adobe Air Native Extention(ANE) for Admob, with latest Admob SDK GMA-23.0.0 for IOS and Android. this Admob ANE offer easy way to integrat Admob Ads with your AIR Games and Apps with few lines of code. compliant with COPPA GDPR... You can use it free for your Android Apps and IOS Apps.
Notice : use "targeting" tags before requesting ads;
- Support AppOpen Ads (New AppOpen Ads from google Admob)
- Support banner(New Anchored adaptive banners from google Admob)
- Support Intersitial
- Support Rewarded Video
- Support landscape and portrait and autoOrient
- Support AdRequest targeting methods,such as children target,test mode
- Support Adobe AIR SDK 32 and Air 33 and 50+ SDK
- Support android x64,x86,arm,and 32,64 bit support
- Support IOS arm64 support
Add Admob ANE to Adobe Animate or adobe Flash air project build path , add this line of code to import the ANE in your game scripts
import com.glm.admob.*;
if you are targeting +12 don't use AppOpen ads it's not compliant with Admob Policy last time i've checked. to Load and Show AppOpen ads add this line of code.
Admob.Ads().ShowAppOpen("your AppOpen ID");
Get Banner Height Size to adjust your game with the Banner Height Size, and to leave a specified place for banner ads to meet new google Admob requirements.
use a var to store the banner Height size "it get auto size based on device dimension". like in this example:
var adaptiveBannerSize = Admob.Ads().getAdaptiveBannerHeight();
add this line of code to Load and Show the Banner.
Admob.Ads().ShowAdaptiveBanner("your banner ID","TOP")
use word "TOP" or "BOTTOM" for banner position, this Admob ANE offer auto orientation based on your Game orientation.
to remove a banner use this line of code
Admob.Ads().HideAdaptiveBanner();
to Load Admob Interstitial in you game use this line of code
Admob.Ads().LoadInterstitial("your Interstitial ID");
to Show Admob Interstitial in you game use this line of code
Admob.Ads().ShowInterstitial();
to Load Admob Rewarded Video Ads in you game use this line of code
Admob.Ads().LoadRewardedVideo("your Rewarded Video ID");
to Show Admob Rewarded Video Ad in you game use this line of code
Admob.Ads().ShowRewardedVideo();
to get events of rewarded video ads and then you specify if the user completed the video "reward the user" or video dismissed use this function to get events of your rewardd video.
public function onVideoEvent(evt:Event):void {
if (evt.type == "UserEarnedReward")
{
//reward the user
}
if (evt.type == "AdShowedFullScreenContent")
{
}
if (evt.type == "AdLoaded")
{
}
if (evt.type == "AdFailedToLoad")
{
}
if (evt.type == "AdFailedToShowFullScreenContent")
{
}
if (evt.type == "AdDismissedFullScreenContent")
{
}
}
this Ane by default target +12 and compliant with "(COPPA)", "tag for child-directed treatment", if you want to change setting based on your game targeting use this line of code
Admob.Ads().TAG_FOR_CHILD_DIRECTED_TREATMENT(true);
set it to true or false, true mean your game target child and false mean not targeting child. "it's true by default".
- and same for Users under the age of consent :
Admob.Ads().TAG_FOR_UNDER_AGE_OF_CONSENT(true);
- to use Ad content filtering use this code "not configured by default" you have to set it if you want to use it
Admob.Ads().TAG_FOR_MAX_AD_CONTENT_RATING("G");
change it to "G" or "PG" or "T" or "MA" based on your wants.
to add a test device to test your ads on you test device, use this line of code
Admob.Ads().Test_Device_ID("your Test Device ID");
replace ca-app-pub-3940256099942544~3347511713 with your admob ID
<android>
<manifestAdditions><![CDATA[
<manifest>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<application>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent"/>
<receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true" android:exported="false" ></receiver>
<receiver android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:enabled="true" android:exported="true" android:permission="android.permission.INSTALL_PACKAGES" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.measurement.AppMeasurementService" android:enabled="true" android:exported="false" />
<service android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:enabled="true" android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true" android:exported="false" ></receiver>
<service android:name="com.google.android.gms.measurement.AppMeasurementService" android:enabled="true" android:exported="false" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544~3347511713"/>
</application>
</manifest>
]]></manifestAdditions>
</android>
replace ca-app-pub-3940256099942544~3347511713 with your admob ID
<iPhone>
<InfoAdditions><![CDATA[
<key>MinimumOSVersion</key><string>12.0</string>
<key>UIPrerenderedIcon</key><true/>
<key>UIDeviceFamily</key>
<array><string>1</string><string>2</string></array>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-1231791771352771~9696996234</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
<extensionID>com.glm.admob</extensionID>
Version 3.0 use Admob sdk V 23.0.0
2024.05.17
admob http://apps.admob.com