i want to make a android app which uses nanohttp to create a web server this code do not give me a error but when i type the ip addr in browser on port 8000 it says connection timed out please help any help will be appriciated here goes the code..
package dolphin.developers.com;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import dolphin.devlopers.com.R;
public class AnroidWebServerActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public class MyHTTPDs extends NanoHTTPD_2 {
public MyHTTPDs(int port, File wwwroot) throws IOException {
super(8000,new File("."));
// TODO Auto-generated constructor stub
}
@Override
public Response serve( String uri, String method, Properties header, Properties parms, Properties files ) {
File rootsd = Environment.getExternalStorageDirectory();
File path = new File(rootsd.getAbsolutePath() + "/");
Response r = super.serveFile("index.htm.html", header, path, true);
return r;
}
}}
and the log cat does not give me any error so i am not posting it...