Reputation: 417
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);
Upvotes: 8
Views: 4226
Reputation: 5767
Firebase does support services. You either need to wait for a day or alternatively you can enable debug mode. Please note that debug mode is only supported in latest Google Play Services release so you will need to use at least version 10.0.0 or later. In debug mode all events are uploaded within seconds or logging the event.
Upvotes: 3
Reputation: 579
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.
Upvotes: 14