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
- https://code.google.com/p/flash-air-admob-ane-for-ios-and-android/
- https://github.com/pozirk/ANEAdMob
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);
}
}
}
}