B4A Library FirebaseAdMob v1.6

Status
Not open for further replies.
Google has added a few new requirements to AdMob implementation. You must make these changes if you are using the latest versions of Android SDK libraries (firebase-ads 18.1.1+).

Instructions:
2. Find your AdMob app id and add it to the manifest editor:
B4X:
'This is a sample AdMob app id. You need to change it to your id.
AddReplacement($ADMOB_APP_ID$, ca-app-pub-3940256099942544~3347511713)
How to find the id: https://support.google.com/admob/answer/7356431?hl=en

3. Initialize MobileAds in Service_Create of the starter service:
B4X:
Dim MobileAds As MobileAds
MobileAds.Initialize
4. Open Tools - B4A Sdk Manager and update all the recommended items.

If the app immediately crashes then it is likely that the app id is wrong. Start with the sample app id and then change it to your app id.

Library is included as an internal library.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User

Computersmith64

Well-Known Member
Licensed User
Longtime User
Just wondering why this library update was required? I was already using firebase-ads v18.2.0 & added:

B4X:
<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
to the manifest - which all seemed to work fine. Are there other changes that necessitated the new FirebaseAdMob library?

- Colin.
 

iz0ndg

Active Member
Licensed User
Longtime User
Is it normal that, after following the instructions for using the FirebaseAdMob v1.6 library, I recompiled the app, I get 99% of the time the error code 3? (1 of 100 advertising appears).
The old app, which is also on the PlayStore, works.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Is it normal that, after following the instructions for using the FirebaseAdMob v1.6 library, I recompiled the app, I get 99% of the time the error code 3? (1 of 100 advertising appears).
The old app, which is also on the PlayStore, works.
I wondered about that too. I had the same issue with a test build of an app on one of my devices, but the ads worked ok on a different device with the same build. I thought it was a bit strange.

- Colin.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
to the manifest - which all seemed to work fine. Are there other changes that necessitated the new FirebaseAdMob library?
Yes. Google instructs developers to call:
B4X:
Dim MobileAds As MobileAds
MobileAds.Initialize

Is it normal that, after following the instructions for using the FirebaseAdMob v1.6 library, I recompiled the app, I get 99% of the time the error code 3? (1 of 100 advertising appears).
The old app, which is also on the PlayStore, works.
It looks like Google is more aggressive in preventing ads from being displayed during development.
 

asales

Expert
Licensed User
Longtime User
I want to test the B4A 9.50 beta, but I have several apps with ads and I don't want update it now.

I can use this version 1.60 with the old version of Firebase (< 18.1.1), without made the modifications?

Or I need install the B4A 9.50 and replace the internal FirebaseAdmod 1.60 with the previous version 1.55?
 

skaliwag

Member
Licensed User
Longtime User
It looks like Google is more aggressive in preventing ads from being displayed during development.

This is driving me nuts.
How are we supposed to check if ads are working correctly if Google won't serve them during development?
 

Balint

New Member
Licensed User
Hi Guys,

Can you help me, please?
I receive the following error message.
 

Attachments

  • Error.JPG
    Error.JPG
    39.5 KB · Views: 308
Status
Not open for further replies.
Top