:sign0142:Ahhh okay
If I remember rightly, adverts show in the emulator because they show test ads. It takes a while for the ads to start appearing in your app running on an actual phone. Just wait a few hours and see if they start appearing.
Sub Globals
...
Dim AdView1 As AdView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layoutmain") 'Cargamos el Layout Principal
'PUBLICIDAD
ListView1.Height = activity.Height-50dip'Recorto es listview
AdView1.Initialize("AdView1", "a14e3423bfXXXXX") 'publisher id that you received from AdMob.
'Activity.AddView(AdView1, 0dip, 400dip, 320dip, 50dip) 'previously the height was 48dip. Now it is 50dip.
Activity.AddView(AdView1, 0dip, ListView1.Height, 320dip, 50dip)
AdView1.LoadAd 'loads an ad
End Sub
Sub Globals
...
Dim AdView1 As AdView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("lista")
ListView1.Height = activity.Height-50dip'Recorto es listview
AdView1.Initialize("AdView1", "a14e3423bfXXXXX") 'publisher id that you received from AdMob.
Activity.AddView(AdView1, 0dip, ListView1.Height, 320dip, 50dip)
AdView1.LoadAd 'loads an ad
End Sub
Yes I did. Here can yo see:Just out of interest, have you changed the android-maifest.xml file and made it read-only?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gcmdesarrollos.AvionesEspanoles"
android:versionCode="4"
android:versionName="0.7b"
android:installLocation="preferExternal">
<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="Aviones Españoles">
<activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
android:label="Aviones Españoles" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name="ficha" android:label="Ficha" android:screenOrientation="unspecified"></activity>
<activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name="lista" android:label="Lista" android:screenOrientation="unspecified"></activity>
<!-- *** For AdMob: manually added *** -->
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
AdView1.Initialize("AdView1", "a14e3423bfXXXXX")
AdView1.Initialize("[b]Ad[/b]", "a14e3423bfXXXXX")
Sub Ad_FailedToReceiveAd (ErrorCode As String)
Log("failed: " & ErrorCode)
End Sub
Sub Ad_ReceiveAd
Log("received")
End Sub
failed: Ad request successful, but no ad returned due to lack of ad inventory.
Ok, thanks.Adsense should help things yes