When dealing with mobile development, we will eventually run our games on a real device. Until then, we have to use some debugging tools. Of course, we might set up remote debugging with gdb
, but as soon as most critical bugs related to access violations are eliminated, here come the logical errors or those related to race conditions, which are difficult to hunt down and require multiple redeployment of the application with somewhat trivial changes to it. To be able to quickly change the runtime behavior of your application directly on an Android device, we can implement an embedded web server with an interface to fine-tune some internal parameters of your application. This recipe contains an outline of App5
, which implements such a web server.
Writing an HTTP server from scratch is not easy, so we use a freely available simple server by René Nyffenegger from the following web page: http://www.adp-gmbh.ch/win/misc/webserver.html.
We use most of these sources...