I am using Facebook SDK for my android app. I am facing scroll lags and performance issues all over the app. Removing the sdk removes all the issues. But i intend to use the sdk for analytics purpose. Is there anything that has to be added with addition to sdk. Any insight is helpful.
I tried just adding the analytics implementation in gradle but still facing the same issues
implementation 'com.facebook.android:facebook-core:4.41.0'
implementation 'com.facebook.android:facebook-android-sdk:4.41.0'
I have realized that the FB auto logging causes the lag. Specially when we put the app to background then bring it back to foreground for several times.
To disable the auto logging, add these to your manifest:
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
android:value="false"/>
ref: https://developers.facebook.com/docs/app-events/getting-started-app-events-android#auto-events
I have no idea how and how can this feature make this serious problem..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With