I m looking for a way to allow a device to send secure notifications to another device with minimal battery loss. I am currently doing this using a SSLServerSocket however I feel like keeping a socket constantly open is very poor for battery life. The other option I considered was to just have a socket listening for a connection but I m not sure if this is any better. I need the notifications to be sent instantly so using a timer and connecting every x number of minutes is not optimal. Are there any good ways to achieve this over a wifi connection with minimal battery loss?
I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...