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. FirebaseAdMob2 - Admob ads integrated with Firebase backend
- https://www.b4x.com/android/forum/threads/firebaseadmob2-google-mobile-ads-sdk-v20.129609/
3. B4A 13.40 and SDK Manager up to date.
Update 7.0:
- Adaptive inline banner with Customlistview
- SDK 35
- AdsHelper class updated
- new sub GetAutoHeightBannerSize: auto height to banner inline adaptative
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
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.
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. FirebaseAdMob2 - Admob ads integrated with Firebase backend
- https://www.b4x.com/android/forum/threads/firebaseadmob2-google-mobile-ads-sdk-v20.129609/
3. B4A 13.40 and SDK Manager up to date.
Update 7.0:
- Adaptive inline banner with Customlistview
- SDK 35
- AdsHelper class updated
- new sub GetAutoHeightBannerSize: auto height to banner inline adaptative
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.
Attachments
Last edited: