iOS Question iAdMob interstitial work and Banner no ?

D

Deleted member 103

Guest
Hi,

as the title suggests.
When Banner comes this error message:
AdView1:Error Domain=com.google.ads Code=1 "Request Error: No ad to show." UserInfo=0x170879a80 {NSLocalizedDescription=Request Error: No ad to show., NSLocalizedFailureReason=Request Error: No ad to show.}

Mein Code:
B4X:
        'AdMob hinzufügen(Werbung)
           AdView1.Initialize("AdView1","ca-app-pub-3476309460992388/1338460354", Page1, AdView1.SIZE_SMART_BANNER_LANDSCAPE)
        Page1.RootPanel.AddView(AdView1, 0, 100%y - GetAddViewHeight, 100%x, GetAddViewHeight)
        AdView1.LoadAd
        AdView1.Visible=True

           iad.Initialize("iad","ca-app-pub-3476309460992388/1338460354")
        iad.RequestAd

Sub GetAddViewHeight As Int
   Dim height As Int
   If GetDeviceLayoutValues.DeviceApproximateScreenSize < 6 Then
     'phones
     If GetDeviceLayoutValues.Width > GetDeviceLayoutValues.height Then
       height = 32dip
     Else
       height = 50dip
     End If
   Else
     If GetDeviceLayoutValues.Width > GetDeviceLayoutValues.height Then
       'tablets
       height = 60dip
     Else
       height = 90dip
     End If
   End If
   Return height
End Sub
 
D

Deleted member 103

Guest
I think I have found the error.
There must be 2 different Admog-ID, one for "interstitial" and one for "banner"
 
Upvote 0

abhishek007p

Active Member
Licensed User
Longtime User
in your code
AdView1.SIZE_SMART_BANNER_LANDSCAPE

you have used SIZE_SMART_BANNER_LANDSCAPE instead of SIZE_SMART_BANNER_PORTRAIT

is it correct, would not that will look big on iPhone in portrait mode?
or i should Initialize the ads based on device's portrait or landscape mode ?
 
Last edited:
Upvote 0
D

Deleted member 103

Guest
Hi abhishek007p,

I use only banners with iAdmob. iAd and "interstitial" I do not use because you have only problems with Apple.
 
Upvote 0

Similar Threads

Replies
6
Views
1K
D
  • Question
Replies
1
Views
1K
  • Locked
  • Article
B4i Library iAdMob
Replies
108
Views
32K
Cookies are required to use this site. You must accept them to continue using the site. Learn more…