Nathan
Nathan

Reputation: 536

How to Setup Admob with Adobe AIR for Android

I currently Finished a Project and put it on the Google Play Store. I created the Application Using Adobe Flash CS6 and Flash Develop AS3.

Now I want to put Ads on my game using Admob but I can't seem to do it to save the life of me. I tried for hours I searched everywhere. I don't have any money to purchase any ANE Native Extension files so I just don't know what to do.

Please if anyone knows how to do this i would more than Appreciate it!!!

Upvotes: 3

Views: 8263

Answers (4)

jim
jim

Reputation: 11

1.first you need download adobe air sdk 20 or later,and upgrade your ide air sdk,then download admob plugin for adobe flash air from

https://github.com/lilili87222/admob-for-flash/

  1. add adobe air admob plugin to your mobile project ,it ease in flash cc ,flash builder or flash developer.

3.then you can call admob api with as3,the following is same sample code

init Admob in flash air,this need call before call other api,banner id and institial id can got from admob

var admob:Admob=Admob.getInstance();
admob.setKeys("your admob banner id","your admob institial id");

show simple admob banner in adobe air app

admob.showBanner(Admob.BANNER,AdmobPosition.BOTTOM_CENTER);

Upvotes: 1

backham
backham

Reputation: 106

I tried this admob ANE: http://code.google.com/p/flash-air-admob-ane-for-ios-and-android
and my app work well now.

some important

1.check up option handler permission by user on flash cs target set panel if not check up this option,flash IDE will change the xml file auto witch caused not ad show

2.add permission config for android,it is easy to forget to do.

<android>
    <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto">
           <uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="18" />
            <uses-permission android:name="android.permission.INTERNET"/>
            <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"/>
            <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"/>
            </application>
        </manifest>

    ]]></manifestAdditions>
</android>
  1. test with a active admob application ID,if use the demo ID it will not work.

Upvotes: 1

Matt
Matt

Reputation: 31

I did have your same problem too.

I spent a lot of time looking for a reliable ANE extension for AdMob in Air application.

All the one i found were always limited in option, outdated or not maintained. neither the less all seems base in old adMob SDKs which do not pass Google and app store approval.

I then found this other ANE extension which seems a lot more complete and is free:
-https://github.com/lancelot1/ane-admob

This extension is amazing is extremely updated to the latest SDk , has a lot of features and work a first try.

I'm really happy with it.

If you are still looking for the right ANE extension for AdMob i strongly recommend you this!

Upvotes: 1

LOG_TAG
LOG_TAG

Reputation: 20589

Give it a try with AdMob Air Native Extension

ANEAdMob is an Adobe AIR native extension (ANE) for Android to show ads. Supported functionality:

  • show ad.

  • cache interstitial ad.

  • show interstitial ad.

  • hide ad.

  • listen tap, close, leave, etc. event.

Upvotes: 3

Related Questions