Samuel Abera Samuel Abera - 4 months ago 38
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;
public void onCreate() {
Player.running = true;

mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);

And Logginng as

Bundle bundle1 = new Bundle();
mFirebaseAnalytics.logEvent("song_finished", bundle1);


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.