| | Hadi Lashkari Mar 13, 13:09 IST Hi We check the calls to the `android.content.SharedPreferences#apply` method in our app and we suspicious this method is called in the main thread after we call Firebase's API in the main thread, where we believe causes some ANRs for us. We would like to know if there is any problem if we call API's methods from the background thread? What is your advice in general cases of using background thread? Firebase version: 5.1.1@aar Best regards, Hadi |
apply:454, SharedPreferencesImpl$EditorImpl (android.app)
zzi:200, zzx (com.google.android.gms.internal.measurement)
zzb:207, zzx (com.google.android.gms.internal.measurement)
getScionFrontendApiImplementation:98, FirebaseAnalytics (com.google.firebase.analytics)
invoke:-1, Method (java.lang.reflect)
zzb:30, AppMeasurement (com.google.android.gms.measurement)
zza:17, AppMeasurement (com.google.android.gms.measurement)
getInstance:20, AnalyticsConnectorImpl (com.google.firebase.analytics.connector)
create:6, zzb (com.google.firebase.analytics.connector.internal)
lambda$new$0:66, ComponentRuntime (com.google.firebase.components)
get:-1, ComponentRuntime$$Lambda$1 (com.google.firebase.components)
get:55, Lazy (com.google.firebase.components)
initializeEagerComponents:155, ComponentRuntime (com.google.firebase.components)
initializeAllApis:553, FirebaseApp (com.google.firebase)
initializeApp:300, FirebaseApp (com.google.firebase)
initializeApp:264, FirebaseApp (com.google.firebase)
initializeApp:249, FirebaseApp (com.google.firebase)
onCreate:51, FirebaseInitProvider (com.google.firebase.provider)
attachInfo:1917, ContentProvider (android.content)
attachInfo:1892, ContentProvider (android.content)
attachInfo:45, FirebaseInitProvider (com.google.firebase.provider)
installProvider:6391, ActivityThread (android.app)
installContentProviders:5938, ActivityThread (android.app)
handleBindApplication:5853, ActivityThread (android.app)
access$1100:199, ActivityThread (android.app)
handleMessage:1650, ActivityThread$H (android.app)
dispatchMessage:106, Handler (android.os)
loop:193, Looper (android.os)
main:6669, ActivityThread (android.app)
invoke:-1, Method (java.lang.reflect)
run:493, RuntimeInit$MethodAndArgsCaller (com.android.internal.os)
main:858, ZygoteInit (com.android.internal.os)