1
votes

I am trying to add an AdMob ANE to an empty Flex Mobile Project but I can see nothing inside the view. Also I am checking the load events and no error occurs. :(

My setup:

  • Adobe FlashBuilder 4.7 (64 bit) Windows
  • Apache Flex 4.10 ( AIR 4.0 )
  • Valid AdMob GUID
  • Updated -app.xml file to allow AdMob

Tested with the samples from following open source ANEs

And so far no luck... Can someone suggest better anes or comment if the listed ones work for their apps ? Thanks!

Update

I have reupdated my sdk and updated AIR on my device to latest version from

/sdk/runtimes/air/android/device/

Now with the ANE from 1st URL i receive the following message in console:

admob ane log:status  code:onBannerFailedReceivelevel:3

My code for this ANE looks like this (just same as in the sample from github )

package com.redcodelabs.view
{
    import flash.geom.Rectangle;

    import mx.core.UIComponent;

    import so.cuo.platform.admob.Admob;
    import so.cuo.platform.admob.AdmobEvent;
    import so.cuo.platform.admob.AdmobPosition;

    public class AdMobView extends UIComponent
    {

        public var admob:Admob=Admob.getInstance();//create a instance

        public function AdMobView()
        {
            super();

            admob.addEventListener(AdmobEvent.onBannerReceive, onAdReceived);

            //set admob banner ID
            admob.setKeys("ca-app-pub-246436233824XXXX/361665XXXX");

            //show banner with relation position
            admob.showBanner(Admob.BANNER,AdmobPosition.BOTTOM_CENTER);

        }

        protected function onAdReceived(event:AdmobEvent):void
        {
            trace(event.type);
            if(event.type==AdmobEvent.onBannerReceive)
            {
                trace("  --  "+event.data.width,event.data.height);
            }

        }
    }
}
4

4 Answers

1
votes

With Milkmangames Admob ANE, you now have to add another ANE : Google Services. It's a new update, and ads won't show if you don't add this ANE (even if it works an no error messages is shown). I don't know if it's only for MilkmanGames ANEs, but maybe you have to look if a new version if available. By the way i'm trying Adbuddiz which is a free ANE and seems to give more money than admob.

0
votes

I have worked with Flash Mobile apps and the first Adobe ANE link mentioned by you where the ads show up fine. Not sure if it would be different for Flex Mobile.

Are you working with the updated Admob interface or the new one. Maybe you want to recheck your Ad id. Also which platform are you compiling your app to? Can you share a bit of your code?

Alternately, there are many ANEs more for Admob -

  1. MilkMan Games - http://www.milkmangames.com/blog/2012/09/27/admob-air-native-extension-now-for-ios-and-android/ This ANE is a paid one

You can also add the Admob network to MoPub and use the MoPub ANE. https://github.com/StickSports/MoPub-ANE

0
votes

onBannerFailedReceivelevel:3

error code 3 mean not enough ad for show.not your code error

    package so.cuo.platform.admob
{
    public class AdmobError
    {
        public static const  ERROR_CODE_ERNAL_ERROR :int= 0;
        public static const  ERROR_CODE_INVALID_REQUEST :int= 1;
        public static const  ERROR_CODE_NETWORK_ERROR :int= 2;
        public static const  ERROR_CODE_NO_FILL :int= 3;
    }
}

ref https://github.com/lilili87222/admob-for-flash/blob/master/admob_ane_ios_android/doc/AdmobError.as

-1
votes

you are using an old ane version,admob need new version sdk after update to admob 2.0 and the error admob ane log:status code:onBannerFailedReceivelevel:3 mean that no ad for show. check out the new version(the old link is brike project has moved to http://code.google.com/p/flash-air-admob-ane-for-ios-and-android/ ),you will get more error detail about the error code 3.