Android Question Ok in test ad-id, but using my ads-ids the space is showing blank

AnandGupta

Expert
Licensed User
Longtime User
Well, with help from @asales , I was able to put test ad-ids in my app and it shows OK.
Then I changed it to my ads-ids, but the space is showing blank, with error line like below from "BannerAd_FailedToReceiveAd", each time
B4X:
Failed: com.google.android.gms.ads.LoadAdError@e073ec4
Failed: com.google.android.gms.ads.LoadAdError@9d026e1
Failed: com.google.android.gms.ads.LoadAdError@e073ec4
Failed: com.google.android.gms.ads.LoadAdError@c6286d6
Failed: com.google.android.gms.ads.LoadAdError@841671
Failed: com.google.android.gms.ads.LoadAdError@1d9637b
Failed: com.google.android.gms.ads.LoadAdError@91169b7
Note that string after @ is changed each time.

How to get more details error message to understand the problem ?

This link show that it can be get, but do not how to do in B4A,

Below are the emails I received from AdMob, so there should not be any problem, but something must be wrong some where. So a detailed error message may help here.
firefox_9AuPWZ3bLg.png

firefox_XJCDk49sq4.png
 

asales

Expert
Licensed User
Longtime User
I never got this errors in ads, but you can check this:

1 - The App Ad Unit in manifest is correct? Did you change it?
2 - The google-services.json is correct?
3 - The Admob Ad Unit to the banner is correct?
4 - The SDK is correct?
5 - This is the signature to check the error to load a banner:
B4X:
Sub BannerAd_FailedToReceiveAd (ErrorCode As String)
    Log(ErrorCode)
End Sub
The ErrorCode return only an integer and you can check the error returned here:

But the log show the error with more information:
B4X:
Adv1 failed: {
  "Code": 3,
  "Message": "Publisher data not found. <https:\/\/support.google.com\/admob\/answer\/9905175#9>",
  "Domain": "com.google.android.gms.ads",
  "Cause": "null",
  "Response Info": {
    "Response ID": "null",
    "Mediation Adapter Class Name": "",
    "Adapter Responses": [],
    "Response Extras": {}
  }
}
Check this link too:
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Thanks a lot @asales for helping me. ?

1 - The App Ad Unit in manifest is correct? Did you change it?
Yes. I double checked them.

2 - The google-services.json is correct?
I do not have the google-services.json as I do not want Firebase A/c (had problem earlier), also as mentioned, I do not need it I think.
[ Note that you can use FirebaseAdMob2 without creating a Firebase account. ]

3 - The Admob Ad Unit to the banner is correct?
Yes, checked again.

4 - The SDK is correct?
As advised in the Forum, I do not update/change the sdk which is installed as per Forum instruction.
Checking the SDK Manager from ide gives long list to items to install.

5 - This is the signature to check the error to load a banner:
Yes using same signature code.

6 - The ErrorCode return only an integer and you can check the error returned here:
The link is giving error Service Unavailable.
Searched in Google and found below link

7 - But the log show the error with more information:
Now I checked unfiltered log and found below,
B4X:
getStreamVolume isRestricted mode = 0
getStreamVolume isRestricted mode = 0
Dynamic lookup for intent failed for action: com.google.android.gms.ads.service.CACHE
Dynamic lookup for intent failed for action: com.google.android.gms.ads.service.START
Ad failed to load : 3
Failed: com.google.android.gms.ads.LoadAdError@bdbfab7
And the code 3 means 'no ad available now'

So I think I can safely put the app on store and it may take some time to show the ads automatically.

If you think I need to have the google-services.json to get the ads, I will create the Firebase a/c.
Also should I update the recommended SDK list ? I am bit afraid here, as Erel advise d not to do it.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
[ Note that you can use FirebaseAdMob2 without creating a Firebase account. ]
I did not know that. Good to know.

Ad failed to load : 3
Failed: com.google.android.gms.ads.LoadAdError@bdbfab7
[/code]
And the code 3 means 'no ad available now'
Yes. It means: The ad request was successful, but no ad was returned due to lack of ad inventory.
Maybe because is a new app, but it seems is the request is right.

If you think I need to have the google-services.json to get the ads, I will create the Firebase a/c.
Also should I update the recommended SDK list ? I am bit afraid here, as Erel advise d not to do it.
1 - Try without the Firebase. I don't know how long it take to show the ads.
2 - Register your device as developer device in Admob. So you will see the real ads with the label "Test Ad".
3 - I have my SDK always up to date and don't have problem, but Erel recommend uses the B4A SDK. So uses the Erel's recommend.

Thanks a lot @asales for helping me. ?
??
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Want to thank everyone ? and close this thread, as ads are showing when downloaded in another mobile from play store.
 
Upvote 0
Top