Android Question [admob] problem with keystore

Discussion in 'Android Questions' started by Waldemar Lima, Jun 4, 2019.

  1. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    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 :
    #Region  Project Attributes
    #ApplicationLabel: Admob
    #VersionCode: 1
    '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.Color = 
    Dim height As Int
    "BannerAd""ca-app-pub-85hgyuftugyftugilyukftgt", BannerAd.SIZE_SMART_BANNER)
    0dip0dip, AdPanel.Width, AdPanel.Height)
    "iad""ca-app-pub-9293>><<><<><><><><<"'aqui é instersticial
    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
    'aparece o intersticial quando clicar nesse bt
    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
  2. Erel

    Erel Administrator Staff Member Licensed User

    Error code 3 = no fill. It means that currently there are no ads to serve. In most cases it will start working properly after 24 hours.
  3. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    Thanks by your attention :D @Erel .

    But using 'Debug Key' the advertising show ...

  4. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    The day before yesterday I had to unlink my default key, but I forgot to ...

    I then recreated another key, and the admob returned only "Admob Error 3", hence I changed to the debug key ... which the ad is displayed without any problem!

    today I am a friend (we 2 have B4A licenses) we spent all day testing to find the reason for the error ...
    the same code that I compile on my machine, also compiles on her machine, the difference is that when she compiles on her machine, the ad is displayed (with release key & with debug key).

    I installed b4a on another computer I have here, but it still has the same problem ...
    I sent my release key to use it to compile on her computer, but when she uses my key, the same errors that occur when compiling an app on my machine are displayed ...

    she sent me the apk compiled on her machine, and it works perfectly ..

    I sent the compiled apk on my machine, Admob error 3 occurs .

    What should be the reason for the problem?
  5. Douglas Farias

    Douglas Farias Expert Licensed User

    i checked this too.
    i think is some problem on keystore generated on B4A 9+

    3 days ago i tryed make a new keystore for my app, in B4A 9. and i only get error 3 too.
    its the same banner and intersticial, this is working on my old key, but with new key no.

    Later i tested with some old key. and works fine.

    B4A 9 = error 3
    B4A 5= normal working (i generated my old key on b4a 5)

    the error is only with keystore new (new version of b4a)

    the solution I found was to use a key generated in an old version of b4a. now it's normal
    Last edited: Jun 4, 2019
  6. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    where can i create a new keystore until check this problem?
  7. Erel

    Erel Administrator Staff Member Licensed User

    Nothing has changed related to the keys in the last couple of versions.
  8. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    So what could be the problem?
  9. jimmyF

    jimmyF Active Member Licensed User

    Java versions?
    Difference between 8 and 11?
  10. Erel

    Erel Administrator Staff Member Licensed User

    It is possible that Google recognizes the old key signature and treats differently the new key.

    Have you already released your app?

    Check the unfiltered logs and see whether there are any message.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice