Khanzada Kashif
04/25/2024, 11:21 AM2.3.9
to establish web socket connection, but when the connection is established and I keep on minimising and maximising my application, after some times it auto breaks the connection with the following message to my backend.
disconnectReason: "Connection closed abnormally"
I don't get it any where in logs on my side. It is happening on both android and ios.
If I keep the application in foreground, everything keeps on working as it should without any issues.
Any ideas why this is happening???Aleksei Tirman [JB]
04/25/2024, 11:34 AMKhanzada Kashif
04/25/2024, 11:35 AMKhanzada Kashif
04/26/2024, 7:40 AMSeveriano Jaramillo
04/29/2024, 10:15 PMafter some times it auto breaks the connection@Khanzada Kashif how much time? I do not know about iOS, but in Android the system can kill applications that are in the background to give resources to the one that is in the foreground. If you need to keep a long-lived connection, even if you app is in the background, you need to use something like a ForegroundService.