问题
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:
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
来源:https://stackoverflow.com/questions/60193763/how-to-get-the-event-count-for-the-current-android-user-using-fabrics-answers-o