setReconnectKickEnable

public abstract void setReconnectKickEnable(boolean enable)

Specifies whether to kick out the reconnecting device during reconnection.

When multi-device login is not enabled for a user, logging in with the same account on a new device will kick out the previously logged-in device. Since the SDK has a reconnection mechanism, the following scenario may occur: A user logs in on device A, but due to unstable network, the connection fails, and the SDK initiates a reconnection. Meanwhile, the user logs in on device B, which successfully connects. When device A's network stabilizes and the user reconnects on device A, device B is kicked out. This interface is designed to handle such scenarios. When enable is set to true, if the SDK detects that another device has successfully connected during reconnection, it will not forcefully kick out the already connected device but will instead kick out the reconnecting device. This method must be called before init.

Parameters

enable

Whether to kick out the reconnecting device