backgroundSyncEnabled

Deprecated

The background sync on push notification is no longer needed to keep the state in sync and will be removed in the future. If you are using the default UI components, or building your own UI using [ChatClient.queryChannelsAsState] / [ChatClient.watchChannelAsState], the state will always be up-to-date. We recommend disabling it to avoid unnecessary background work.

Parameters

backgroundSyncEnabled

Controls whether the SDK performs background synchronization when push notifications are received. When enabled (default: true), the SDK automatically syncs messages in the background when a push notification arrives, ensuring the local state/database stays up-to-date even when the app is in the background. This is particularly useful for displaying accurate notification content and maintaining offline state consistency. Disable this if you want to reduce background processing.