Hi,
I've a problem with an application that I've developed to display some information on a tablet by a server application. The tablet connect a nodejs server and wait for some information coming from the server and when the information arrive the tablet display the information for some seconds and then clear the display showing a default waiting message. All works great in my tablet with android 4.0 but when I use tablets with android 4.1 and greater the application seems to don't recive nothing anymore after some minutes (perhaps about 20 minutes).
In the application I've put both KeepAlive(True) (for not turning off the display) and the PartialLock (for not going to sleep the CPU). Infact with Android 4.0 the application doesn't turn off the display and it's always responding to the incoming data even after long time of no data trafic even if there is set to "never" the advanced property of "Keep WI-FI ON during sleep". It works exactly as I want. But with Andorid 4.1 and greater if the server waits for too much time (like I've said before about 20 minutes) the application doesn't recive the incoming data even if the display is always on.
I've also introduced in the application a kind of heart-beat so the server application sends each 20 seconds a dummy data packet that the tablet application recives and process but not made to display somthing, just for keeping alive the socket, but it seems to don't produce any kind of effects.
The other strange thing is that I've also a label that indicates if the TCP connection is on or off and it shows always on. The only thing that I could not check at the moment is if the value of "Keep WI-FI ON during sleep" on the tablets with Andoid 4.1 and greater because are by my costumers and actually are closed. But as in Android 4.0 it works great indipendently from the value of "Keep WI-FI ON during sleep" I aspect that it does the same also with 4.1 and greater.
Can anyone suggest me any solutions?
I hope I was clear.
Thanks a lot for the attention.
I've a problem with an application that I've developed to display some information on a tablet by a server application. The tablet connect a nodejs server and wait for some information coming from the server and when the information arrive the tablet display the information for some seconds and then clear the display showing a default waiting message. All works great in my tablet with android 4.0 but when I use tablets with android 4.1 and greater the application seems to don't recive nothing anymore after some minutes (perhaps about 20 minutes).
In the application I've put both KeepAlive(True) (for not turning off the display) and the PartialLock (for not going to sleep the CPU). Infact with Android 4.0 the application doesn't turn off the display and it's always responding to the incoming data even after long time of no data trafic even if there is set to "never" the advanced property of "Keep WI-FI ON during sleep". It works exactly as I want. But with Andorid 4.1 and greater if the server waits for too much time (like I've said before about 20 minutes) the application doesn't recive the incoming data even if the display is always on.
I've also introduced in the application a kind of heart-beat so the server application sends each 20 seconds a dummy data packet that the tablet application recives and process but not made to display somthing, just for keeping alive the socket, but it seems to don't produce any kind of effects.
The other strange thing is that I've also a label that indicates if the TCP connection is on or off and it shows always on. The only thing that I could not check at the moment is if the value of "Keep WI-FI ON during sleep" on the tablets with Andoid 4.1 and greater because are by my costumers and actually are closed. But as in Android 4.0 it works great indipendently from the value of "Keep WI-FI ON during sleep" I aspect that it does the same also with 4.1 and greater.
Can anyone suggest me any solutions?
I hope I was clear.
Thanks a lot for the attention.