Ho messo nel mio programma il seguente codice per far apparire il banner
B4X:
Banner_Sotto_Audio.Initialize2("Ad","ca-app-pub-9860102643964774/2601596448",Banner_Sotto_Audio.SIZE_SMART_BANNER)
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize<6 Then
'Telefoni
height=50dip
Else
'Tablet
height = 90dip
End If
Activity.AddView(Banner_Sotto_Audio,0dip,100%y-height,100%x,height)
Banner_Sotto_Audio.LoadAd
Banner_Sotto_Audio.BringToFront
Avvio in modalità release però del banner neanche l'ombra. Cosa mi sono dimenticato?
Banner_Sotto_Audio.Initialize2("Ad","ca-app-pub-9860102643964774/2601596448",Banner_Sotto_Audio.SIZE_SMART_BANNER)
Activity.AddView(Banner_Sotto_Audio, 0dip, 100%y - GetAddViewHeight , 100%x, GetAddViewHeight )
Banner_Sotto_Audio.LoadAd
Banner_Sotto_Audio.Visible=True
Sub GetAddViewHeight As Int
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
'phones
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
If 100%y>100%x Then
'tablets
height = 90dip
Else
height = 50dip
End If
End If
Return height
End Sub
Sub Ad_FailedToReceiveAd (ErrorCode As String)
Log(ErrorCode)
End Sub
Sub Ad_ReceiveAd
Log("Ad_ReceiveAd")
End Sub