Research whether network traffic can wake an app from sleep or doze
The all-knowing oracles of Stack Overflow have conflicting opinions about whether an Android app that's blocked reading from a TCP connection while the device is sleeping will be woken when data arrives. This may be device-dependent. Certainly the connection that's used for GCM/Firebase can wake the device, but the same may not be true of other connections. We also need to investigate whether doze behaves differently from sleep in this respect. Some sources claim that wifi behaves differently from mobile data - if so, we should investigate whether holding a wifi lock affects this.
It would also be useful to know whether an incoming connection to a server socket wakes the app.
Related to #44, #268 (closed).