androidc++httpwebsimplehttpserver

How to make an Android Web Server?


How do i make an application like kws which allows our handheld device to act as a server. It should be able to handle post request and host a web site. Any idea where I should start?


Solution

  • I assume you are developing in C++.

    You can start with HappyHTTP library from Ben Campbell and libcurl to create your small web server on an Android. Both can be quite easily compiled for Android and work well. If you need to handle only get/post requests it is more than enough.

    Here's an example how to do it in C++: https://github.com/corporateshark/Android-NDK-Game-Development-Cookbook/tree/master/Chapter3/8_MakingWebServer