How to get the event count for the current Android user using Fabric's Answers or Google Analytics?

467 Views Asked by At

I have an app logging a custom event into Fabric's Answers as follows:

Answers.getInstance().logCustom(new CustomEvent("AnEvent");

Using Answers API for apps, is it possible to query the total number of occurences of this event for the current user ?

If not possible with Answers, is it possible with Google Analytics for Firebase ?

1

There are 1 best solutions below

0
On

I had run into the same problem. It appears this will now need to be done with Firebase Analytics and not the new crashlytics within Firebase.

I previously was logging when a user got a new level in my game with the following code.

var levelName : String = "level 2"
Answers.getInstance().logLevelStart(LevelStartEvent().putLevelName(levelName)

The way I have migrated this to Firebase Analytics is with the following code.

var firebaseAnalytics : FirebaseAnalytics = FirebaseAnalytics.getInstance(activity)
val params = Bundle()
params.putString(FirebaseAnalytics.Param.ITEM_NAME, "Level " + Game.State.gameLevel)
firebaseAnalytics.logEvent(LEVEL_START, params)

Below is the list of Fabric terms translate to Firebase Analytics

enter image description here