AdMob problem

Russo

Member
Licensed User
Longtime User
Hi, i have problems with AdMob lib.
I have the very simple code:

B4X:
Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
      Activity.LoadLayout("demoAD")
      Dim AdView1 As AdView
      AdView1.Initialize("Ad", "MY_EDITOR_ID")
      Activity.AddView(AdView1, 0dip, 100%y-50dip, 320dip, 50dip)
      AdView1.Enabled = True
      AdView1.Color = Colors.Cyan
      AdView1.Visible = True
      AdView1.LoadAd
   End If
End Sub

When AdViewLoadAD is launched, allways received the error: "a network error ocurred"

The Manifest file are:


B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="es.gosub.demoAD"
      android:versionCode="1"
      android:versionName=""
     android:installLocation="internalOnly">
      <uses-sdk android:minSdkVersion="4" />
      <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="demo AD">
       
        <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
                  android:label="demo AD" android:screenOrientation="unspecified">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

    </application>
   <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>


</manifest>

And android.jar library are:

C:\Android\android-sdk\platforms\android-13\android.jar

WiFi is ON and connected to Internet without proxy.
The app isn't uploaded to Market, is only for testing.


Whats wrong ?

Thx
 

Russo

Member
Licensed User
Longtime User
Reply myself !!!!!

the problem was ........ DNS !!!!
can't resolv adsgoogle ...... all work ok, now

Thanks
 
Upvote 0
Top