user2852398
user2852398

Reputation: 43

admob ads doesn't show up using milkmangames extension in flash

I have made an app in flash for android and I have followed everything as said here: http://www.adobe.com/devnet/air/articles/admob-ane-android.html to show ads in my app, but the ads ain't showing up, if I place this code:

if(AdMob.isSupported)
{
AdMob.init("my publisher id");
}
else
{
trace("AdMob won't work on this platform!");
return;
}

AdMob.addEventListener(AdMobErrorEvent.FAILED_TO_RECEIVE_AD,onFailedReceiveAd);
function onFailedReceiveAd(e:AdMobErrorEvent):void
{
trace("Ad failed to load.");
}


AdMob.showAd(AdMobAdType.BANNER,AdMobAlignment.LEFT,AdMobAlignment.BOTTOM);

above all the other code nothing works anymore and if I place this code below all the rest code the app works but the ads never show up, does someone know how I can show my ads??

Upvotes: 0

Views: 893

Answers (3)

alshayal
alshayal

Reputation: 11

AdMob.isSupported will always return false if you're testing on the simulator. So you've to test on device to be able to test AdMob in general.

Upvotes: 1

Kevin Newman
Kevin Newman

Reputation: 928

I had a similar problem, and wrote to Milkman. They politely suggested I read the manual - GettingStarted.pdf, and sure enough, in there is a note about setting up your -app.xml properly.

You need to include certain manifestAdditions in the android section of -app.xml:

 <android>
   <manifestAdditions><![CDATA[
      <manifest android:installLocation="auto">
         <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
         <uses-permission android:name="android.permission.INTERNET"/>
         <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
         <application>
            <!-- this meta-data tag is required for AdMob  -->
            <meta-data android:name="com.google.android.gms.version" android:value="4452000"/>
            <!-- this activity is required for AdMob -->
            <activity android:name="com.google.android.gms.ads.AdActivity"
             android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
             android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
         </application>
      </manifest>
   ]]></manifestAdditions>
 </android>

Upvotes: 0

Alexandru Balea
Alexandru Balea

Reputation: 19

I manage to notice that milkmangames Admob ANE has some issues. Just out of the sudden no ads and i mean not a single ad is displayed under intervals of time. milkman games ads aren't displayed without notice. At first i thought it was google fault but unity ads are working perfectly. People are loosing serious amounts of money because of this. Perhaps google is blocking ads for milkman games ANE?

Upvotes: 0

Related Questions