V/FA: Processing queued up service tasks: 1 followed by V/FA: Inactivity, disconnecting from AppMeasurementService

Tsvetozar Tsonev picture Tsvetozar Tsonev · Sep 27, 2016 · Viewed 24.8k times · Source

As it is visible in the console output below, the application usually needs 7-10 seconds to process the service and often fails to do it. This happens on every startup.

Why is it taking so long? Is it because the service is trying to connect multiple times before giving up? Also, what is actually the logic behind this output?

Note: I don't have any FirebaseAnalytics code in my application

09-26 23:34:48.998 /package V/FA: Processing queued up service tasks: 1
09-26 23:34:54.009 /package V/FA: Inactivity, disconnecting from AppMeasurementService
09-26 23:34:57.357 /package V/FA: Activity paused, time: 89152495
09-26 23:34:57.383 /package V/FA: onActivityCreated

build.gradle(app)

//Firebase
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-database:9.4.0'
compile 'com.google.firebase:firebase-invites:9.4.0'
compile 'com.firebase:geofire-android:2.0.0'
compile 'com.firebaseui:firebase-ui:0.5.1'

Answer

Dan Morenus picture Dan Morenus · Oct 5, 2016

The "Processing queued up service tasks" and "Inactivity, disconnecting from AppMeasurementService" messages are both logged on a worker thread, not the main app thread, so they are not holding up your app.

The processing of queued up service tasks likely completes nearly instantly; the disconnect due to inactivity merely means that no one has asked Firebase Analytics to do anything for a while so it's disconnecting from its service until someone does. That's normal, especially if your app isn't making calls to FirebaseAnalytics.

"Activity paused" means that the app's current activity (screen) has been removed from display; this could be something your app did or user action. Since there's an "onActivityCreated" message right after that I'd say your app got rid of one activity and replaced it with another.

Without more information on what your app is doing it's very difficult to guess why the app might have slow responses.

BTW, try using "adb logcat -v threadtime" to get process and thread IDs in the logging statements.