Android Example [B4XPages] Admob Example

Check this other excellent example from @Jack Cole.

To help the new members to make money with B4A, I tried to compile all the relevant Admob code (except mediation) of the forum in this example and put comments and links.
This is a work in progress.
Any code and sample to improve this example are welcome.

Follow these instructions to start:
1. Integrating Firebase Services
- https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/
2. FirebaseAdMob - Admob ads integrated with Firebase backend
- https://www.b4x.com/android/forum/t...tegrated-with-firebase-backend.67710/#content
3. FirebaseAdMob v1.6
- https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/
4. B4A 9.90 and SDK Manager up to date.

Update 6.0:
- Adaptive banner with customlistview

Update 5.0:
- Rewarded Video and Rewarded Interstitial Ads
- AdsHelper updated with code from Jack Cole. Thanks!

Update 4.0:
- removed transitions code to fix this error
- example code to adjust volume level
B4X:
Dim volume As Float = 0.5
jo.RunMethod("setAppVolume", Array(volume))

Update 3.0:
The example was updated with some changes made with the FirebaseAdmob2 lib.
- new lib: FirebaseAdmob2
- change SIZE_SMART_BANNER format to Adaptive Banner
- AdsHelper Class
- Rewarded video ad removed
- App Open Ad included

Updated 2.0 (B4XPages_Admob_Example):
- B4XPages
- Transition in Interstitial ad (requires Reflection library)
- Code to mute the ad sound
- Banner in a panel

This is not a (almost) definitive example anymore, like the old title said.

1690758087061.png
 

Attachments

  • b4xpages_admob_example6.zip
    57.8 KB · Views: 82
Last edited:
Top