Like a lot of other developers I received an email yesterday informing me that AdMob SDK v6.4.1 will no longer work after September 15th. Reading through threads on here it seemed that Erel was advising anyone using AdMob to update to the Firebase AdMob library, as it uses the latest version of the AdMob SDK.
Switching from the mwAdMobInterstitial2 library to the FirebaseAdMob library was pretty straightforward (I think I only had to change 2 lines of code), however when I went to compile the app it failed with a Google Play Services error (I use NFOBoy's wrapper, which requires Google Play Services v14 API). On further investigation, I discovered I could compile the app without the code that accesses NFOBoy's wrapper, however my app then crashed when it went to load an ad because it was expecting google_play_services_version 9256000 & the value I was using in my ids file was 4132500. After I changed it to 9256000, Firebase ads worked fine - but of course, my Google Play Games Services would no longer work because the wrapper references functions that have been deprecated in later versions of Google Play Services.
So I thought that maybe I could specify a different play services version for Firebase & Play Games - I did this in my manifest:
however it seems that while you can customize the label associated with the label, you can only have one meta-data entry for "com.google.android.gms.version" - or more specifically, if you have more than one, it's the last one that is used.
So - the question is: If we have to move to Firebase ads, how can we also continue to have leaderboards & achievements in our apps as well?
- Colin.
Switching from the mwAdMobInterstitial2 library to the FirebaseAdMob library was pretty straightforward (I think I only had to change 2 lines of code), however when I went to compile the app it failed with a Google Play Services error (I use NFOBoy's wrapper, which requires Google Play Services v14 API). On further investigation, I discovered I could compile the app without the code that accesses NFOBoy's wrapper, however my app then crashed when it went to load an ad because it was expecting google_play_services_version 9256000 & the value I was using in my ids file was 4132500. After I changed it to 9256000, Firebase ads worked fine - but of course, my Google Play Games Services would no longer work because the wrapper references functions that have been deprecated in later versions of Google Play Services.
So I thought that maybe I could specify a different play services version for Firebase & Play Games - I did this in my manifest:
B4X:
AddApplicationText(
'**********Google Play Games Services*********
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
)
'*********End of Google Play Games Services*************
'************ Firebase Ads ************
AddApplicationText(
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
android:theme="@style/Theme.IAPTheme"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version_firebase" />
)
'************ Firebase Ads (end) ************
however it seems that while you can customize the label associated with the label, you can only have one meta-data entry for "com.google.android.gms.version" - or more specifically, if you have more than one, it's the last one that is used.
So - the question is: If we have to move to Firebase ads, how can we also continue to have leaderboards & achievements in our apps as well?
- Colin.