W wl Well-Known Member Licensed User Longtime User Apr 6, 2012 #1 Hello, I would like my app to have a constantly open connection to my server. I would be using AsyncStreams for this. What would be the best practice as to avoid the Android OS would decide to kill the thread with the open socket ? And also: how to restart the connection in case would have decided to close this thread ? Thanks !
Hello, I would like my app to have a constantly open connection to my server. I would be using AsyncStreams for this. What would be the best practice as to avoid the Android OS would decide to kill the thread with the open socket ? And also: how to restart the connection in case would have decided to close this thread ? Thanks !
thedesolatesoul Expert Licensed User Longtime User Apr 6, 2012 #2 Probably a foreground service has the least chance to be killed. If it does get killed, you can either schedule the service to open again or wait till the activity is invoked. Sent from my GT-I9000 using Tapatalk Upvote 0
Probably a foreground service has the least chance to be killed. If it does get killed, you can either schedule the service to open again or wait till the activity is invoked. Sent from my GT-I9000 using Tapatalk