hello everyone !!
i am trying insert a advertsing on my application ...
but I found a problem in the keystore ...
if I go into "tool -> Private Signature" and select "Use debug key", the ad is displayed ...
if I create a new key or use an existing one, the ad does not display and the "Admob Error: 3"
i am using this code :
Does anyone know how to fix this?
I appreciate the attention
i am trying insert a advertsing on my application ...
but I found a problem in the keystore ...
if I go into "tool -> Private Signature" and select "Use debug key", the ad is displayed ...
if I create a new key or use an existing one, the ad does not display and the "Admob Error: 3"
i am using this code :
B4X:
#Region Project Attributes
#ApplicationLabel: Admob
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#BridgeLogger: true
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Private BannerAd As AdView
Private IAd As InterstitialAd
Private re As RewardedVideoAd
Private Button1 As Button
Private Button2 As Button
Private Button3 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim AdPanel As Panel
AdPanel.Initialize("")
AdPanel.Color = 0xFFFFFFFF
Dim height As Int
Activity.LoadLayout("Layout1")
BannerAd.Initialize2("BannerAd", "ca-app-pub-85hgyuftugyftugilyukftgt", BannerAd.SIZE_SMART_BANNER)
Activity.AddView(AdPanel,0dip,350dip,100%x,50%y)
AdPanel.AddView(BannerAd, 0dip, 0dip, AdPanel.Width, AdPanel.Height)
BannerAd.LoadAd
IAd.Initialize("iad", "ca-app-pub-9293>><<><<><><><><<") 'aqui é instersticial
IAd.LoadAd
End Sub
Sub Activity_Resume
End Sub
Sub BannerAd_FailedToReceiveAd (ErrorCode As String)
Log("Error : "&ErrorCode)
End Sub
Sub IAd_FailedToReceiveAd (ErrorCode As String)
Log("Error : "&ErrorCode)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button2_Click 'coloca o banner como invisivel
BannerAd.Visible = True
End Sub
Sub Button1_Click
If IAd.Ready Then
IAd.Show 'aparece o intersticial quando clicar nesse bt
Else
Log("not now")
End If
End Sub
Sub Button3_Click 'coloca o banner como visivel
BannerAd.Visible = False
End Sub
Does anyone know how to fix this?
I appreciate the attention