Simple and Small footprint TCP/IP Web Server for Android in Java
This is standalone, multithreaded, almost or No dependancy ! http server in Java with example use in Android.
Features supported
What it does not do?
<uses-permission android:name="android.permission.INTERNET"/>
Call following from android service or process
@Override
protected void onCreate(Bundle savd){
super.onCreate(savd);
...
//call contructor with local ip, port , public html directory path
TinyWebServer.startServer("localhost",9000, "/web/public_html");
}
@Override
public void onDestroy(){
super.onDestroy();
//stop webserver on destroy of service or process
TinyWebServer.stopServer();
}
open AppApis.java and write your own mehtod/function inside AppApis.java for example,
public String myfirstapi(HashMap qparms){
//todo - write your api logic here
//qparms is collection of GET and POST parameters
}
you can access this api -> http://localhost:9000/myfirstapi
helloworld is api method inside AppApis.java
Design, Build, Tested by
twitter , github /@sonuauti