Whatever I do I cannot display the banners from Admob, I tested on two Android different devices and here is what I get:
First device:
I/Ads ( 8161): Starting ad request.
I/Ads ( 8161): Please set theme of AdActivity to @android:style/Theme.Translucent to enable transparent background interstitial ad.
I/Ads ( 1006): CsiReporterFactory: CSI is not enabled. No CSI reporter created.
W/Ads ( 1006): JS: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/loadAdURL?drt_include=0&request_id=............
W/Ads ( 1006): (null:1)
W/Web Console( 1006): The page at about:blank displayed insecure content from gmsg://mobileads.google.com/loadAdURL?drt_include=0&request_id=............
W/Ads ( 1006): JS: The page at about:blank displayed insecure content from gmsg://mobileads.google.com/loadAdURL?drt_include=0&request_id=............
W/Ads ( 1006): (null:1)
W/Web Console( 1006): The page at about:blank displayed insecure content from gmsg://mobileads.google.com/loadAdURL?drt_include=0&request_id=............
W/Ads ( 1006): JS: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.
W/Ads ( 1006): (null:1)
W/Ads ( 1006): Received error HTTP response code: 400
W/Ads ( 8161): There was a problem getting an ad response. ErrorCode: 0
W/Ads ( 8161): Failed to load ad: 0
Note: here neither onAdLoaded( ) nor onAdFailedToLoad( ) is getting called
Second device:
I/Ads ( 1165): CsiReporterFactory: CSI is not enabled. No CSI reporter created.
I/Ads ( 1165): Starting ad request.
I/Ads ( 1165): Use AdRequest.Builder.addTestDevice("XXXXXXXXXXXXXXXXXXXXXXXXXX") to get test ads on this device.
I/Ads ( 1165): CsiReporterFactory: CSI is not enabled. No CSI reporter created.
W/Ads ( 1165): There was a problem getting an ad response. ErrorCode: 2
I/Ads ( 1165): Scheduling ad refresh 60000 milliseconds from now.
W/Ads ( 1165): Failed to load ad: 2
My code:
protected void onCreate( Bundle icicle )
{
super.onCreate( icicle );
m_glView = initOpenGLView( );
m_adMobView = new AdView( this );
m_adMobView.setAdSize( AdSize.SMART_BANNER );
m_adMobView.setAdUnitId( "XXXXXXXXXXXXXXXXXX" ); <----I just replaced the ID with XXX for this example
m_adMobView.setAdListener( new AdListener( )
{
public void onAdLoaded( )
{
egNative.LogMessage( "ADMob::onAdLoaded" );
};
public void onAdFailedToLoad( )
{
egNative.LogMessage( "ADMob::onAdFailedToLoad" );
}
} );
FrameLayout layout = new FrameLayout( getApplicationContext( ) );
layout.addView( m_glView );
int gravity = android.view.Gravity.CENTER_HORIZONTAL | android.view.Gravity.TOP;
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.WRAP_CONTENT ,
FrameLayout.LayoutParams.WRAP_CONTENT , gravity );
layout.addView( m_adMobView , params );
setContentView( layout );
}
@Override protected void onStart( )
{
super.onStart( );
AdRequest.Builder ad_builder = new AdRequest.Builder( );
m_adMobView.loadAd( ad_builder.build( ) );
}
I am running the latest version of Google Play services. Also have double checked the Ad unit IDs and they're fine. Not getting any positive results with test Ad unit IDs too. Can you guys post any hints eventually? Thank you in advance.