I am working on a application using Socket.IO implemented with 'com.github.nkzawa:socket.io-client:0.5.1'. All works fine but issue is when phone goes to the idle mode or sleep mode, socket is disconnected from server. guide me how i make socket alive while phone goes to sleep.
i tried already using wakelock and use Foreground service to keep my sockt connection alive but not solve the issue.
I want my socket always alive while phone is in sleep mode or not.