It'll get killed by the Android system unless you place it into a Service and make it a foreground service.
NanoHTTPD stopped when I play games
Question
I have an android application that starts a server NanoHTTPD. The problem happens when I start the server, I leave the application in the background, and I start playing a game or a heavy application. After a few minutes the server is stopped. How I can keep the server started, even playing games or using other applications? (like AirDroid)
Thanks in advance.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow