I developed chat application using Twilio Programmable Chat SDK on Android.
Issue :
There are two users A & B joined to a Channel "AB_Private" and doing chat working fine.
Now user A press home button and put application in background. Twilio SDK detect inactivity and start sending ping to server to keep connection a live.
Working fine for 4-5 minutes but after that twilio disconnect from the socket and start retrieving request. But it never connects till user app is in background.
Now when app comes to foreground, twilio reset the session and try to reconnect but it takes more time to connect, sometime it takes up to 5 minutes.
So my question is how can I keep connection alive with Twilio when application is in background?
Any Help will be appreciated.