I'm using NanoHTTPD to present a web server in an android app. I'm using a wifi lock to keep the network alive, and a CPU lock to keep the cpu awake, and keeping it running via a foreground service so that it should never die.
What i'm finding is that it'll be accessible from other devices for half an hour, and then not accessible for half an hour. Whenever it becomes inaccessible, I can open safari on the android device and browse to 0.0.0.0:30000 and verify that the server is indeed running. And i also check to make sure the wifi is connected which it appears to be.
Any suggestions of where to look?