I think that what we're looking for is a WebServer object that runs on the device.
Imagine an Apache webserver running on the device - any application can request a file from
http://localhost/.
Maybe the webserver could support PHP but that's not relevant for now (and would require a very bloated library).
A simple WebServer that has a
root folder property and once running will serve HTTP requests from that folder would be ideal.
What we need is an alternative to the file system and the file protocol (file:///) for web apps that use features that are not supported when a webpage is loaded using the file protocol.
Another use that i would make use of is where i have device generated
KML file and want to display that KML using the device's native Map application.
The native Map application can be started with an Intent specifying a URL to a
publically accessible KML file.
If you launch an Intent that tries to load a KML file from the file system then the Map application will fail to load that KML - Google servers need to be able to load that KML file via the internet so that it can generate the layer to display on the map.
An Intent with a file protocol KML file will never be rendered as the Google servers cannot retrieve the KML from the device's file system and therefore cannot convert the KML file into an overlay layer to be displayed in the Map appilication.
I looked at this just a few weeks back and found no simple solution.
One or two old and no longer maintained non-Android libraries with lots of problems/bugs but nothing that could be easily converted into a B4A library.
Even if Erel and the team could create a new WebServer object there could still be problems if that WebServer was required to be accessible from the internet and not just from the local device.
Many devices connect to the (3G) internet using Network Address Translation (NAT) and share a common IP address.
Such a device is not going to be accessible with that IP address - yet more code would be required to make the device and the WebServer running on it truly
online.
Martin.