Skip to main content
Participating Frequently
January 20, 2014
Question

milkmangames extension for AIR question AdMob question

  • January 20, 2014
  • 4 replies
  • 1710 views

First of all, I apologize for puting the post here, I didn't manage to get any reply from them so I figure they must be too busy.

Maybe someone here who used their AdMob extension could be kind enough help me here:

I am using their AdMob extension for iOS and Android and I come across this issue.

I have two scenes [in Flash] that uses the AdMob extension, an invisible Sprite in each scene is in charge of initialzing & destroying the Ad [AdMob.destroyAd()] and will initialize it again on the next scene.

However, after it has been destroyed and re-initialized in the next scene, I get an error from your extension saying it has already been initialized and the ad area turns blank.

Can I assume that internally, when AdMob.destroyAd() is called, they close it some time later instead of immediately ?

How do I fix this issue on my end ?

This topic has been closed for replies.

4 replies

Known Participant
August 28, 2015

keymobdev/Adobe-Air-ANE · GitHub

Keymob can be very easy to use management various advertising platforms in application, including which platform ad impressions, the proportion of each platform, setting priorities.

Support admob, chartboost, inmobi.mmedia, amazon, iad, baidu and other common advertising platform, more platforms will been supported.

Support rich forms of advertising, including the popular banner a variety of sizes, rect ads, Interstitial ads, video ads, More APP Ad

Known Participant
February 10, 2015

I have done one agem in flash cc , admob sdk 16 . while checking game i shut down wifi then ads gone again if i switch on wifi then no adds will be coming,

for that i have done one coding using URLMonitor, but this time add coming first time only but second time ads not displaying

I have done the following code

import air.net.URLMonitor;

import flash.net.URLRequest;

import flash.events.StatusEvent;

var monitor:URLMonitor = new URLMonitor(new URLRequest("http://google.com"));

monitor.addEventListener(StatusEvent.STATUS, checkHTTP);

monitor.start();

function checkHTTP(e:StatusEvent)

{

    if (monitor.available)

    {

         AdMobExample();

          sta_txt.text ="Connection  available";

     }

    else

    {

        sta_txt.text ="No internet connection available";

      }

}

Plz help me

Known Participant
January 26, 2014

var admob:Admob=Admob.getInstance();//create a instance
admob
.setKeys("a152834c2b8cce6");//set admob appid
admob
.showBanner(Admob.BANNER,AdPosition.BOTTOM_CENTER);//show banner with relation position

https://code.google.com/p/flash-air-admob-ane-for-ios/

Colin Holgate
Inspiring
January 20, 2014

I don’t use their AdMob ANE, but I use other ones. They use Singletons, which means that when you initialize it the first time it’s initialized for the whole session. If you try to initialize it again you will get script errors (and so the rest of your function will fail).

Find a way to know that you’ve used the ANE that session already, and don’t initialize it after the first time.

Also, make sure to read the GettingStarted.pdf in the docs folder, that should give lots of example code.

Participating Frequently
January 21, 2014

Thanks for the reply

This is their API:

destroyAd():void

         

getTestDeviceIDs()

init(publisherId:String, secondPublisherId:String = null)

refreshAd():void

         

setVisibility(visible:Boolean):void

         

showAd()

         

showInterstitial()

There is no API to find out if the ad object has been fully destroyed or for that matter, if it has been initailzied.

I have made the effort to destroy the ad via "destroyAd()" so that I can initailze it again on the next scene.

Unfortunately, this is where the error report that it has already been initialized even though I have destroyed it, atleast via their API.

I would love for them to respond.

I was kind of disappointed that they didn't, I also bought the push notification extension from them which had I know there will be zero customer service, I would have not bought it

Colin Holgate
Inspiring
January 21, 2014

It’s the init() function I was referring to. Look for this:

AdMob.init("YOUR_PUBLISHER_ID”);

and make sure that it only happens once per session. If you’re doing it each time you’re going to show an ad, then you would get errors.