I am using a serversocket in android. I connect in a browser to: 192.168.1.100:8080.
I am trying to show a picture in my PC’s browser, from my android assets, my code is:
String js=openFileFromAssets("js");
send("<head>" +
"<link rel=\"stylesheet\" type=\"text/css\" " +
"href=\"file:///android_asset/css.css\" />" +
"<meta http-equiv=\"Content-type\" value=\"text/html; charset=ISO-8859-2\">Második oldal " +
"<img src='file:///android_asset/icon.png'><div id='asd' style='clear:left'>0</div> " +
js +
"</head>");
How can I show that picture from the assets folder, to my browser? (icon.png)
I have the /assets folder.
Thanks, Leslie
You probably don’t want to bother writing your own (unless you really want to write your own, in which case you’ll need much more than what you have). Take a look at one of the existing chunks of code such as this, and then modify the output to stream the content out of the asset folder using AssetManager.open.