I followed this tutorial : https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/
1) I have install all recommended items with B4A Sdk Manager tool.
2) My Firebase was created 2 days ago. with good package.name
3) I have download "google-services.json" from web ("firebase")
4) I did not really understand what I had to put in the manifest of the coup I joined you the code
5) When I run a test the ads are displayed, but when i put my "ca-app-pub-xxxxx/xxxxx", ads are no longer displayed on the screen
i have B4A version 8
Manifest Code :
1) I have install all recommended items with B4A Sdk Manager tool.
2) My Firebase was created 2 days ago. with good package.name
3) I have download "google-services.json" from web ("firebase")
4) I did not really understand what I had to put in the manifest of the coup I joined you the code
5) When I run a test the ads are displayed, but when i put my "ca-app-pub-xxxxx/xxxxx", ads are no longer displayed on the screen
i have B4A version 8
Manifest Code :
HTML:
'AdMob
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
)
'End of AdMob
B4X:
Sub Globals
Private BannerAd As AdView
Private IAd As InterstitialAd
End Sub
Sub Activity_Create(FirstTime As Boolean)
BannerAd.Initialize2("BannerAd", "ca-app-pub-8935643716482518~7951009036", BannerAd.SIZE_SMART_BANNER)
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
'phones
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
'tablets
height = 90dip
End If
Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)
BannerAd.LoadAd
IAd.Initialize("iad", "ca-app-pub-3940256099942544/1033173712")
IAd.LoadAd
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Click
If IAd.Ready Then IAd.Show
End Sub