B4J Question WebApp Question (noob)

Andromeda

Member
Licensed User
Longtime User
Hello,

i just try to run the WebAppHelloWorld from Erel. This works fine. Run and then open the browser with "localhost/#portnumber"...
So far its ok to do that.
When i look in that Main.bas there is the command "StartMessageLoop" which only can be used in a "non UI" App.

Now my question. When i have a UI-APP (B4X) and want to run a html-file in a browser, i want to click on a button which starts the server and opens the browser with the appropriate link. All in one click. How can i do this in a "normal" B4X App?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
StartMessageLoop is not relevant to this question.

When i have a UI-APP (B4X) and want to run a html-file in a browser
The question is whether this html file needs a web server or not. If it is a simple html file then you can show it with fx.ShowExternalDocument.
If it does need a web server then you will need to create a separate non-ui jServer based project and run it.
 
Upvote 0
Top