Milkman Games
10Nov/1121

Announcing Native Android AdMob for Adobe AIR!

Milkman Games is very pleased to announce our newest extension for Adobe AIR 3.0: Native support for AdMob on Android! Monetizing apps on any mobile platform can be a challenge- but it's about to get a lot easier for Flash/AIR developers targeting Android. AdMob offers best in breed mobile ads for Android, and you can now display native ads in your AIR applications with just 2 lines of code.

We've put this extension through the paces with a production app - the new ad-supported/free Android edition of Aqualux, available here. The MMG AdMob Android Extension is extremely simple to use, while supporting all the key features you need to begin monetizing your games and apps straight away:

  • Fast and easy setup
  • Support for test ads during development
  • Easy placement and alignment, automatic handling of stage rotation
  • Create, destroy, hide, and show ads at any point in your app
  • Events and logging for ad state (ad loaded, failed to load, link clicked, etc.)

And quite a bit more.  The MMG AdMob Extension for AIR 3.0 is available now for $29.99, and comes with full documentation, quick start guide, sample app, and one year of e-mail support.  Learn more and pick it up now in the Tools section.

Comments (21) Trackbacks (5)
  1. Thanks guys,
    You made a wonderful job.
    I’ve just bought your extension and make it work!

    One suggestion: I think you should add to your GettingStarted.pdf a step by step description for registering on adMob and for creating the advertize because ads is a new thing for many flash developers.
    Thanks

  2. Glad you’re enjoying it Karza! Thanks for the suggestion. We’ll see about adding more details about the google control panel end.

  3. Hi,

    this is great – been waiting for exactly this sort of thing (too lazy/unskilled to do it myself). Looking at your docs, it looks like you do not support banners smaller than the 320 x 50 size. Because of the layout of my main product, I can’t get away with that banner size for older phones like the Droid. Is it possible to call for the smaller sizes?

    Scott

  4. Thanks Scott! Nothing smaller is supported because the AdMob SDK does not provide any smaller sizes than that. If it won’t fit you may have to detect screensize (or detect the ‘failed to load ad error’) and compensate. This doc on the admob site explains the banner options currently available: http://code.google.com/mobile/ads/docs/android/intermediate.html

  5. Thanks. I was used to the Web formats and didn’t realize. I’ll have to adapt the layout somehow. Any pointers to info on using the command line packager to put this all together for Android from Flash? I assume it is similar to the Playbook build process, but I haven’t ever used it for Android.

  6. Got it working! Thanks! This rocks.

  7. Great job! With this method AdMob can suspending the account? StageWebView hacks = Suspended from AdMob! And i can use it 100% with Flash CS5.5 Air for Android Projects? Please answer and i getting start with you solution! :) Thanks!

  8. Thanks Hardy! No, you will not be suspended for using the extension. It is the official Google AdMob Android java solution, wrapped up in an easy interface for Actionscript 3 – so it would be no different than using the official sdk in a native java android App.

    You can definitely use Flash cs5.5 to build your swf files. You will need to download the AIR 3 SDK from adobe seperately to compile your APK files though (using the command line or a batch/script file.) This is a one-line job and fully explained in the documentation. I expect the next update of Flash will support extensions completely and then you can forego that step as well.

  9. I’ve bought your extension and i need some help :)
    - Can i test AdMob Ads in SWF or i need Android SDK?
    I created a simple project in Flash CS5.5 like this to test the extension:
    1) New blank project > Air for Android
    2) In Flash Professional CS5.5:
    1. Select File> Publish Settings> Flash> ActionScript 3.0 Settings
    2. Select Library Path
    3. Click Browse to SWC file
    4. Select the AdMobAPI.swc
    3) I press F9 to insert ActionScript 3.0:
    import com.milkmangames.nativeextensions.android.events.AdMobErrorEvent;
    import flash.display.Sprite;
    import flash.geom.Rectangle;
    import flash.text.TextField;
    import com.milkmangames.nativeextensions.android.AdMob;
    import com.milkmangames.nativeextensions.android.AdMobAdType;
    import com.milkmangames.nativeextensions.android.AdMobAlignment;
    import com.milkmangames.nativeextensions.android.events.AdMobEvent;

    AdMob.init (“///// my id /////”);
    AdMob.showAd (AdMobAdType.IAB_BANNER, AdMobAlignment.LEFT, AdMobAlignment.BOTTOM);

    I would like to know if this is how the code is written or it’s wrong?
    Can I test to SWF or only on AdMob Android SDK?
    Please help on how to display adv with “Flash CS5.5 Air for Android Project” you can give me a tip?

  10. Hi Hardy, the code looks fine! Ads will only show up on the actual Android device though (or the emulator) so you do need the SDK handy in order to run android apps. (it should already be on your machine if you had android projects building earlier.)

    There is one line you’ll have to run on the command line to package the final apk if you’re using flash to make the swf. An example is shown in the GettingStarted.pdf . I’ll send you an email so I can help you with specific directions or troubleshooting.

  11. Excellent stuff, now, if you could get an extension for in-app billing, that would be amazing…. :) Would pay much more for that!

  12. Thanks! That’s coming very soon! Follow on Twitter if you want updates.

  13. HOORAY!
    Trying to run through this quickly, I had looked over the fact that the IAB_BANNER was the default in the example file. No ad is displayed in portrait on my phone, because IAB_BANNER is tablet size. Fixed once i realized you have to request BANNER if in a smaller space (such as phone). FYI to anyone else.
    http://code.google.com/mobile/ads/docs/android/intermediate.html

    thanks Milk Man!!!

  14. Thanks for the comment Nick! The example does use IAB_BANNER with the expectation of a landscape oriented device, which would fit. You’re right it can be unclear if you’re using portrait mode, I’ll change it to the smallest banner for clarity.

  15. can i display ads in android flex apps with this extension?

  16. Yes, you can.

  17. So, based on comments, it appears this component works well….plan on buying, but before I do, quick question. Specifically targeting Nook Color and Kindle Fire. Should work just fine….but there isn’t any weirdness with these platforms that might be anticipated that you ran into? I know there probably shouldn’t be, but you never know. Have you tested this component on tablets?

  18. Hi James,

    It will work fine on stock Android tablets, but I wouldn’t necessarily count on ones like the Nook Color which are just ‘based’ on Android- I believe since many ads depend on android market as the end point it may not run in custom environments where Android Market has been completely removed from the OS (such as Nook Color.)

  19. Can I display ads on AIR for desktop app?

  20. Hi Joel, this is a native Android extension so it is for AdMob Android only. If you know of a desktop ad provider you’d like to see supported, I’d be happy to look into it for the future.

  21. Hi MilkMan, thanks for the reply! Will be placing my order soon for your Admob Android Extension and iAd for iOS Extension.


Leave a comment

(required)