Simple web server

straybullet

Member
Licensed User
Longtime User
Is there a simple web server for B4A ie library I am missing that will allow a B4A app to connect to it's self locally to by-pass the stupid built in security to run JavaScript and html5 in our webviews?

How does phone gap get around this, wonder if it has a built in web server, seems to me we could really open up some awesome possibilities with html5 in our apps.
 

Fusseldieb

Active Member
Licensed User
Longtime User
Sorry for answering a such "old" thread, but I've just found a solution for that problem:
It also stops listening on activity_pause, it's supposed to re-start on activity_resume but didn't. But I'm sure you guys can figure it out.
Just put following in Activity_Resume:

B4X:
Sub Activity_Resume
If Server.IsInitialized Then
    Server.Listen
    Log("Continue Listening")
    Else
     Server.Initialize(HTTP.DefaultPort, "Server")
        Server.Listen
        HTTP.AddDefaultDirectories
    Log("Re-initialized Listening")
    End If
End Sub
 
Upvote 0
Top