Admob and Firebase Analytics extensions

#1

Hi all,

I’m successfully using @sergey.lerg admob extension in Blocks Unlock

Now I want to add Firebase Analytics extension to understand how users are interacting with the game.

Ie: how many levels and words are played, how many moves they used to complete … etc …

The problem by adding both extension is that are using different versions of same dependency:

Admob:

Firebase Analytics :

Android Support v4 library versions are different (26 and 27)

Fixup in Admob Extension gps-ads seems to be conflicting with gps-measurement in Firebase Analytics Extension.

I’m getting errors while bundling:

There are specific version of these extensions can coexists?

Having both Admob and Firebase Analytics is a cornerstone, they are fully integrated in firebase console!

0 Likes

Firebase error
#2

Try using admob dependencies and only add

https://github.com/defold/android-base-extensions/releases/download/1.0.0/firebase-core-16.0.8.zip

for firebase.

Should work I guess.

1 Like

#3

I have just tried, but it does not compile.

I just added

https://github.com/defold/android-base-extensions/releases/download/1.0.0/firebase-core-16.0.8.zip 

:sweat_smile:

0 Likes

#4

It’s com-google-android-gms-play-services-measurement-api-16.5.0.jar inside my gps-ads-17.2.1.zip is conflicting with firebase.
If you extract that zip, remove that jar and add the rest into your project (you can just copy), it should work.

0 Likes

#5

I’ve fixed gps-ads-17.2.1.zip and copied into local IIS to serve as extension.

Now project is bundled, but crashes at runtime :woozy_face:

0 Likes

#6

Argh! What a mess. The missing class is contained in that deleted JAR file.
I don’t know what is the correct way of resolving this. You can go further and repack that JAR file, deleting only the duplicate classes and leaving the rest, but that’s insane.

Maybe you can use facebook extension for analytics? It’s working fine. Either the one by Defold or mine https://github.com/Lerg/extension-facebook.

0 Likes

#7

Facebook Analytics could be an alternative.
But I hope not so far to use Admob with Firebase together :slight_smile:

0 Likes

#8

Hi @sergey.lerg,

I’d like to know if you have some good news about using both Admob and Firebase in the same project.

@Mathias_Westerdahl was talking about a way to simplify this aspect

Unfortunately this issue is also blocking the usage of Push Notifications

Thanks in advance :upside_down_face:

0 Likes

#9

I am using admob, and I have to use some Analytics Tool.

I tried Facebook Analytics following the instructions in here: https://defold.com/manuals/facebook/

I have this problem when building the app:

Failed building Android resources to R.java: /var/folders/g1/317kcvf966b3knjtxc969n980000gn/T/bob_bundle_tmp11395954875322272039/extensions/facebook/com-facebook-android-facebook-common-5.9.0/values/com-facebook-android-values.xml:71: error: Error retrieving parent for item: No resource found that matches the given name ‘@style/Theme.AppCompat.NoActionBar’.

/var/folders/g1/317kcvf966b3knjtxc969n980000gn/T/bob_bundle_tmp11395954875322272039/extensions/facebook/com-facebook-android-facebook-common-5.9.0/values/com-facebook-android-values.xml:76: error: Error retrieving parent for item: No resource found that matches the given name ‘@style/Theme.AppCompat.Dialog’.

So, Facebook Analytics is not an option.

0 Likes

#10

We will release a new Defold version mid January with support for Gradle dependency resolution. This will almost completely eliminate any problems with incompatible extensions. For now it’s a big hassle to get multiple extensions with overlapping dependencies to play well together. My recommendation is to wait one or two weeks until after the release when the extensions have been updated as well.

6 Likes