I'm trying to put a P2P app together on Android using WebRTC. However, if the person acting as the server minimizes the app or leaves their device unattended for a while the device will go to sleep and everything breaks down (lost connections to the server etc -- which is understandable)
What is the best way, using C2, to have the acting server NOT sleep? I've seen things about the 'keep screen on' property and wake locks, however, how does one utilize those in C2? Ideally it would be something programmatic such that I would only ask the acting server to remain 'awake' while the other clients didn't have to....
Maybe a more overarching question is, do WevRTC apps play well with Android sleep and power optimization features? :S
And advice would be appreciated.