Open rahatshahzeb opened 5 years ago
I solved this issue by tracking connection changes using the ConnectivityManager and manually reconnecting the socket
val networkCallback: ConnectivityManager.NetworkCallback = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { object : ConnectivityManager.NetworkCallback() { override fun onAvailable(network: Network) { wsManager?.startConnect() } override fun onLost(network: Network) { wsManager?.stopConnect() } } }
I solved this issue by tracking connection changes using the ConnectivityManager and manually reconnecting the socket