Samuel Abera Samuel Abera - 6 days ago 5
Android Question

Firebase event not logging from Android Service

I have a music streaming service in my android app and I was trying to log streamed musics using Fire-base event logging.I implemented everything accordingly and I can see events from my Activities but not from my services.

Am I missing something or doesn't firebase support events from services?

public class Player extends Service implements ...{


public FirebaseAnalytics mFirebaseAnalytics;
@Override
public void onCreate() {
Player.running = true;
super.onCreate();

this.startForeground();
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
...
}


And Logginng as

Bundle bundle1 = new Bundle();
bundle1.putString(FirebaseAnalytics.Param.VALUE,"song_finished");
mFirebaseAnalytics.logEvent("song_finished", bundle1);

Answer

As per Firebase documentation, logging of Analytics takes upto 24hours to show up on firebase console. So if you have logged an event, you would have to wait for few hours to show up on the console.

Comments